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,15 +67,17 @@ export default ({isVueLoader = false, isServer}) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// -- With extractCSS --
|
// -- With extractCSS --
|
||||||
if (!isServer && this.options.build.extractCSS) {
|
if (this.options.build.extractCSS) {
|
||||||
loaders.unshift(MiniCssExtractPlugin.loader)
|
if (!isServer) {
|
||||||
if (this.options.dev) {
|
loaders.unshift(MiniCssExtractPlugin.loader)
|
||||||
// css-hot-loader
|
if (this.options.dev) {
|
||||||
// https://github.com/shepherdwind/css-hot-loader
|
// css-hot-loader
|
||||||
loaders.unshift({
|
// https://github.com/shepherdwind/css-hot-loader
|
||||||
loader: 'css-hot-loader',
|
loaders.unshift({
|
||||||
options: { sourceMap }
|
loader: 'css-hot-loader',
|
||||||
})
|
options: { sourceMap }
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Prepare vue-style-loader
|
// Prepare vue-style-loader
|
||||||
|
@ -376,7 +376,9 @@ export default class Renderer {
|
|||||||
APP += m.script.text({ body: true })
|
APP += m.script.text({ body: true })
|
||||||
APP += m.noscript.text({ body: true })
|
APP += m.noscript.text({ body: true })
|
||||||
|
|
||||||
HEAD += context.renderStyles()
|
if (!this.options.build.extractCSS) {
|
||||||
|
HEAD += context.renderStyles()
|
||||||
|
}
|
||||||
|
|
||||||
let html = this.resources.ssrTemplate({
|
let html = this.resources.ssrTemplate({
|
||||||
HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(),
|
HTML_ATTRS: 'data-n-head-ssr ' + m.htmlAttrs.text(),
|
||||||
|
Loading…
Reference in New Issue
Block a user