fix: extractCSS:true and dev:false break building

This commit is contained in:
Clark Du 2018-03-19 22:41:16 +08:00
parent 3481ceb059
commit e116ff5a71

View File

@ -130,7 +130,9 @@ module.exports = 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')