-
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
"css should not be empty" with postcss config in next.js with purge css #31
Comments
Also getting this with the following config (where I'm not using either PostCSS or nextCSS):
|
Thanks for your code snippets @vinutha93bnvs and @dalanmiller . In both cases, are you confirming index.html is being generated before HtmlCriticalWebpackPlugin runs? Any errors? |
@thescientist13 , |
@vinutha93bnvs |
yes. my main intention was SPA. But to start with, i tested with a demo index.html file generated by static site generator (Gatsby), with external css file linked, critical css did not work. To my knowledge, external style tag detection and path is not extracted in a proper way by this plugIn. |
Can you please share the contents of your index.html though? My main concern is that critical needs DOM to scan in index.html to see what styles need to get extracted. So with a SPA, there usually isn't much DOM in index.html, and so not much for critical to scan. |
Just to follow up, a user with a similar report found that running Can you please confirm as well? Might not be a plugin issue. |
I am expecting the .css file to be picked from index.html and inject inline critical css.
The text was updated successfully, but these errors were encountered: