frontend: make webpack better

This commit is contained in:
Cadey Ratio 2016-12-18 08:51:15 -08:00
parent 65f3326eaf
commit 0315c0b721
1 changed files with 10 additions and 10 deletions

View File

@ -41,18 +41,18 @@ module.exports = {
}), }),
new FaviconsWebpackPlugin('../static/img/avatar.png'), new FaviconsWebpackPlugin('../static/img/avatar.png'),
new webpack.optimize.DedupePlugin(), new webpack.optimize.DedupePlugin(),
new webpackUglifyJsPlugin({ new webpack.optimize.UglifyJsPlugin({
cacheFolder: path.resolve(__dirname, 'output/ug'), beautify: false,
debug: false, mangle: true,
minimize: true, comments: false,
sourceMap: false, compress: {
output: { dead_code: true,
comments: false loops: true,
}, if_return: true,
compressor: { unused: true,
warnings: false warnings: false
} }
}), })
], ],
resolveLoader: { resolveLoader: {
modules: [ modules: [