Nuxt.js: Critical CSS handling behavior differs in `nuxt generate`

Created on 17 Jul 2017  路  5Comments  路  Source: nuxt/nuxt.js

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:

  1. Am I doing something wrong? I haven't done anything special but maybe it requires additional jobs to achieve same effect in nuxt generate?
  2. If it's not my mistake, is this behavior (cannot handle critical css correctly in nuxt generate) inevitable?
  3. 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 馃槃

This question is available on Nuxt.js community (#c960)
question

Most helpful comment

Should be fixed in the next release.

All 5 comments

Hey mate, love the way you are rendering the routes by grabbing the .md files. @heejongahn Learned something new!

Wow, thanks for the kind words @piyushchauhan2011 馃槉 I'm glad that my repo helped!

Plus I would love any input on this issue as well ;)

Should be fixed in the next release.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nassimbenkirane picture nassimbenkirane  路  3Comments

jaredreich picture jaredreich  路  3Comments

surmon-china picture surmon-china  路  3Comments

bimohxh picture bimohxh  路  3Comments

mattdharmon picture mattdharmon  路  3Comments