fix: minified webpack builds

This commit is contained in:
iCrawl
2017-09-05 19:03:06 +02:00
parent a8df63ad1a
commit 9e66e806ce
3 changed files with 10 additions and 3 deletions

View File

@@ -19,7 +19,14 @@ 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 },
output: { comments: false },
},
}));
}
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line