Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Critical CSS by default #14

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Extract Critical CSS by default #14

merged 2 commits into from
Jun 14, 2019

Conversation

cometkim
Copy link
Owner

Description

PR for #7

Brings enhancement of FCP(First Contentful Paint) time to projects are using this plugin.

And It handles only linaria styles so wouldn't conflict any other CSS imports, libraries.

Changes

  • Configure Babel

  • Split CSS chunk group for linaria styles(two different chunks styles(default) and linaria)
    image

  • Extract Critical CSS from linaria styles removes unused from critical CSS area

Results

image

(I'm not sure why it doesn't work for / page... probably a bug of linaria/server)

Critical CSS on top of head:
image

Entire CSS on bottom of body:
image

cometkim added 2 commits June 14, 2019 02:50
Brings enhancement of FCP(First Contentful Paint) time to projects are using this plugin

Changes:
- Split CSS chunk group for linaria styles
- Extract Critical CSS from linaria styles, removes unused from critical css area

Resolves #7
@cometkim cometkim mentioned this pull request Jun 13, 2019
@silvenon
Copy link
Collaborator

Awesome, thanks! This goes beyond my experience with Gatsby plugins, but you seem like you know what you're doing, and this looks like a good implementation. I hope you don't mind sticking around a bit in case someone reports a bug. 😉

@silvenon silvenon merged commit 4f7571a into cometkim:master Jun 14, 2019
@silvenon
Copy link
Collaborator

silvenon commented Jun 14, 2019

Published in v1.2.0.

@cometkim
Copy link
Owner Author

I will keep watching it I'm also using your plugin for my work :) Thank you @silvenon for plugin!

@cometkim cometkim deleted the critical-css branch June 14, 2019 14:03
cometkim referenced this pull request in cometkim/devsisters-web-packages Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants