You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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: