fix: extractCSS:true and dev:false break building

This commit is contained in:
Clark Du 2018-03-19 23:55:37 +08:00
parent 34c1cad8cc
commit 190923e51a
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -124,7 +124,9 @@ export default function webpackClientConfig() {
// CSS extraction // CSS extraction
const extractCSS = this.options.build.extractCSS const extractCSS = this.options.build.extractCSS
if (extractCSS) { // TODO: Temporary disabled in dev mode for fixing source maps
// (We need `source-map` devtool for *.css modules)
if (extractCSS && !this.options.dev) {
config.plugins.push(new ExtractTextPlugin(Object.assign({ config.plugins.push(new ExtractTextPlugin(Object.assign({
filename: this.getFileName('css') filename: this.getFileName('css')