fix: extractCSS:true and dev:false break building

This commit is contained in:
Clark Du 2018-03-19 22:41:16 +08:00
parent d4f0a6f59a
commit cf1fc9cb1c
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -133,7 +133,9 @@ export default function webpackClientConfig() {
// CSS extraction
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({
filename: this.getFileName('css')