I look forward to css extracted to the css file, because of such a use, not recognized in China Baidu seo, or look forward to a method to achieve css extraction, do not need to be embedded in the page css



There is no solution here

/ping @jericopulvera @syropian @Atinux
Why is this issues closed without a solution?
/ping @Atinux
My project is also plagued by this problem, looking forward to get resolved as soon as possible
Ping @clarkdo
ExtractTextPlugin has been configurable in nuxt.config.js which will be included in next release.
module.exports = {
build: {
extractCSS: {
allChunks: true
}
}
}
For a quick fix, you may config ExtractTextPlugin through build.extend
module.exports = {
build: {
extractCSS: true,
extend(config, options) {
const extract = config.plugins.find(plugin => plugin.renderExtractedChunk)
extract.options.allChunks = true
}
}
}

Nuxt I use is indeed the latest, is a direct github installation, but still can not use the following configuration ah! !
module.exports = {
build: {
extractCSS: {
allChunks: true
}
}
}
Ping @clarkdo


The problem is not solved
Ping @clarkdo
Did you run the service by dev or build and start ?
I have tried by yarn build, the bundle files seemed work.
npm run dev
For dev, I think because ExtractTextPlugin doesn't work well with HMR, so @pi0 has commented it.
Well, understood, thank you very much, only build can be fine
I opened a pr to fix the HMR issue in ExtractTextPlugin and enable the plugin.
perfect very helpful to me!
then how to fix this?
@willin this was fixed, and you just just adding extractCSS: true to your nuxt.config.js
and run npm build then npm run start. after that open the page_source to see that.
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.
Most helpful comment
I opened a pr to fix the
HMRissue inExtractTextPluginand enable the plugin.