fix: webpack minified and bump deps

This commit is contained in:
iCrawl
2018-02-17 18:01:20 +01:00
parent 40a2f093aa
commit a7b46be923
3 changed files with 18 additions and 11 deletions

View File

@@ -19,7 +19,15 @@ const createConfig = options => {
}),
];
if (options.minify) plugins.push(new UglifyJSPlugin({ uglifyOptions: { output: { comments: false } } }));
if (options.minify) {
plugins.push(new UglifyJSPlugin({
uglifyOptions: {
mangle: { keep_classnames: true },
compress: { keep_classnames: true },
output: { comments: false },
},
}));
}
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line