Fix minimizer on Webpack production config

This commit is contained in:
orblazer 2018-03-20 14:43:57 +01:00
parent 52ca9d2201
commit 395591d93e

View file

@ -33,7 +33,23 @@ module.exports = {
]
},
optimization: {minimize: false},
optimization: {
minimizer: [
new UglifyJSPlugin({
include: /\.min\.js$/,
parallel: true,
sourceMap: false,
uglifyOptions: {
compress: true,
ie8: false,
ecma: 5,
output: {comments: false},
warnings: false
},
warningsFilter: () => false
})
]
},
plugins: [
new webpack.DefinePlugin({
@ -41,20 +57,6 @@ module.exports = {
WEBGL_RENDERER: JSON.stringify(true)
}),
new CleanWebpackPlugin([ 'dist' ]),
new UglifyJSPlugin({
include: /\.min\.js$/,
parallel: true,
sourceMap: false,
uglifyOptions: {
compress: true,
ie8: false,
ecma: 5,
output: {comments: false},
warnings: false
},
warningsFilter: () => false
})
new CleanWebpackPlugin([ 'dist' ])
]
};