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

Don't refetch a CSS chunk if it's inlined into the HTML <head> #53

Closed
KyleAMathews opened this issue Mar 23, 2018 · 2 comments
Closed

Comments

@KyleAMathews
Copy link

In Gatsby v2, we'll be using webpack 4 and mini-css-extract-plugin. Gatsby tries to always inline the critical CSS for a page — which aligns perfectly with mini-css-extract-plugin's goals. Currently, however, if we inline a CSS chunk, it'll still be loaded once the webpack runtime loads in the client. Discussing this with @sokra, he suggested that we'd adopt a convention where if you add a data-href to the <style> tag that then webpack wouldn't reload the inlined css.

@sokra
Copy link
Member

sokra commented Mar 26, 2018

fixed by #55

@sokra sokra closed this as completed Mar 26, 2018
@andiwinata
Copy link

has the fix been published to npm? seems like it still having the old code

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

No branches or pull requests

3 participants