fix: disable vue-style-loader when extractCSS

This commit is contained in:
Clark Du 2018-03-22 18:10:46 +08:00 committed by Pooya Parsa
parent e051adbf0a
commit da40bcf18b

View File

@ -63,13 +63,6 @@ export default ({ isServer }) => {
}
})
// Prepare vue-style-loader
// https://github.com/vuejs/vue-style-loader
loaders.unshift({
loader: 'vue-style-loader',
options: { sourceMap }
})
// -- With extractCSS --
if (this.options.build.extractCSS) {
if (!isServer) {
@ -83,6 +76,13 @@ export default ({ isServer }) => {
})
}
}
} else {
// Prepare vue-style-loader
// https://github.com/vuejs/vue-style-loader
loaders.unshift({
loader: 'vue-style-loader',
options: { sourceMap }
})
}
return loaders
}