Open Mifaresss opened 4 months ago
In this case, it makes more sense for them to be blocking. Or else we will be seeing FOUC. More on this topic: https://web.dev/articles/critical-rendering-path/render-blocking-css
CSS is by render blocking in any framework unless you lazyload it, which brings it's own problems around FOUC as mentioned above. You're generally better off focusing on other performance issues and making sure you ship as little CSS as possible.
I understood, thanks. But still, how can I ensure that they do not block rendering? Maybe some plugin which extract all critical css and put it in
Link to the code that reproduces this issue
https://github.com/Mifaresss/nextjs-css-render-blocking
To Reproduce
Current vs. Expected behavior
CSS should not block render, but result is: https://www.webpagetest.org/result/240224_BiDcPN_7X3/1/details/
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Additional context
I also add experimental optimizeCSS in next.config.mjs, but it still render blocking..
Pure nextjs app, npm run start: