forked from nrwl/webpack-plugin-critical
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Usage with code splitting #35
Comments
hmm, yeah not sure if this related to #29 , which also seems to be within the context of a SPA. I'm not sure how well critical itself support SPA, where there's only usually a root element in the HTML for index.html, and so maybe not as possible to extract what is actually "critical" in that context. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a react app which I have recently added code splitting into to try and improve performance. That helped a lot but now I have the issue which is that I have a bunch of CSS files downloading and Google PSI is telling me to "Defer Unused CSS". I was hopeful that this plugin would help with that but I'm not sure if it's intended to work with code-splitting or not.
I do want to retain my code-splitting so I'm not downloading huge JS files which is even worse than the problem I have now but when I implement HTML Critical Webpack Plugin I get a tiny bit of CSS inlined and the rest of the CSS is as it was, in the code-split chunk files.
Here is my plugin setup:
This is from an ejected Create React App which is all still default except for the addition of HtmlCriticalWebpackPlugin.
The output I get in my is as follows:
I can tell you there's a heck load more styles within the top 1920x940 than what has been inlined here!
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: