Only uglify if building for production.

Uglify was trying to run always, including the dev-server output, which
included es6 that broke uglifier.
This commit is contained in:
Paul Kaplan 2017-11-17 09:59:09 -05:00
parent 2d9722e69c
commit 26771e9e0c

View file

@ -20,12 +20,12 @@ const base = {
}
}]
},
plugins: [
plugins: process.env.NODE_ENV === 'production' ? [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
})
]
] : []
};
module.exports = [