Nuxt.js: CSS in HEAD tag

Created on 29 Mar 2017  路  4Comments  路  Source: nuxt/nuxt.js

Hello, if I want separate css files after generate not in head tag, how can I do it?

This question is available on Nuxt.js community (#c406)
help-wanted

Most helpful comment

image
Attachment: This is the future :)) React guys never would see something like that with plain css :))

All 4 comments

@demyan1411 Please see @atinux answer to the almost same question (#333).
extract text plugin is not used in webpack (at least in current release) in order to make Nuxt fully PWA compatible so we don't have a separate css generated. We can easily add this back with nuxt.config's extend function and happy help you implement that. Anyway i don't recommend it, guys behind Vue are trying hard to resolve problems with critical path css loading (thus only classes used in page are in head tag) anyway currently it is not a big concern as atinux says, full bootstrap bundle is gzipped ~26KB and only needs to be loaded on first request.

image
Attachment: This is the future :)) React guys never would see something like that with plain css :))

The reasoning behind not extracting CSS may be logical, but it creates other problems, such as not being able to rely on the Vue mounted lifecycle event, and other styling-related issues. (See: #1684)

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

mattdharmon picture mattdharmon  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

maicong picture maicong  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

mikekidder picture mikekidder  路  3Comments