mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
fix: not render all styles when css extracted
This commit is contained in:
parent
4b8545710c
commit
df939be712
@ -67,7 +67,8 @@ export default ({isVueLoader = false, isServer}) => {
|
||||
})
|
||||
|
||||
// -- With extractCSS --
|
||||
if (!isServer && this.options.build.extractCSS) {
|
||||
if (this.options.build.extractCSS) {
|
||||
if (!isServer) {
|
||||
loaders.unshift(MiniCssExtractPlugin.loader)
|
||||
if (this.options.dev) {
|
||||
// css-hot-loader
|
||||
@ -77,6 +78,7 @@ export default ({isVueLoader = false, isServer}) => {
|
||||
options: { sourceMap }
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Prepare vue-style-loader
|
||||
// https://github.com/vuejs/vue-style-loader
|
||||
|
@ -376,7 +376,9 @@ export default class Renderer {
|
||||
APP += m.script.text({ body: true })
|
||||
APP += m.noscript.text({ body: true })
|
||||
|
||||
if (!this.options.build.extractCSS) {
|
||||
HEAD += context.renderStyles()
|
||||
}
|
||||
|
||||
let html = this.resources.ssrTemplate({
|
||||
HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(),
|
||||
|
Loading…
Reference in New Issue
Block a user