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 10:04:57 -05:00
parent 77e3d63da9
commit 067eb1940d

View file

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