Critical CSS handling behavior differs in `nuxt generate`
[issue link]First off, I really really appreciate all of the work you forks have done. I’m using nuxt for my personal website and the overall dev experience it provides is simply awesome. Serving it w/ gh-pages and it just works!
Anyway, I’m having this small trouble that, unlike in dev environment, critical CSS is not handled correctly (as desired?) when I serve static files generated by nuxt generate
.
For instance, I have white-space: pre-line
property for some element on the first page. This rule is loaded before the first render and don’t trigger any layout re-render when served in nuxt start
(which is pretty neat). However, re-layout occurs from the statically generated site (see my site for instance).
It kinda makes me sad, so I have a few questions:
- Am I doing something wrong? I haven’t done anything special but maybe it requires additional jobs to achieve same effect in
nuxt generate
? - If it’s not my mistake, is this behavior (cannot handle critical css correctly in
nuxt generate
) inevitable? - If it isn’t, how can I help fixing this? I’m willing to contribute to solve this issue (if it is actually an issue), and little hint might help a lot for me to get started.
Thanks in advance for reading, you folks are amazing 😄