mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Fix webpack uglify
This commit is contained in:
parent
45bc653988
commit
8a7a805d92
2 changed files with 4 additions and 2 deletions
|
|
@ -52,7 +52,8 @@
|
|||
"discord.js-docgen": "hydrabolt/discord.js-docgen",
|
||||
"eslint": "^3.19.0",
|
||||
"parallel-webpack": "^1.6.0",
|
||||
"uglify-js": "mishoo/UglifyJS2#harmony",
|
||||
"uglify-js": "mishoo/UglifyJS2#harmony-v2.8.22",
|
||||
"uglifyjs-webpack-plugin": "^0.4.3",
|
||||
"webpack": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
const webpack = require('webpack');
|
||||
const createVariants = require('parallel-webpack').createVariants;
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const version = require('./package.json').version;
|
||||
|
||||
const createConfig = options => {
|
||||
|
|
@ -12,7 +13,7 @@ const createConfig = options => {
|
|||
new webpack.DefinePlugin({ 'global.GENTLY': false }),
|
||||
];
|
||||
|
||||
if (options.minify) plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true }));
|
||||
if (options.minify) plugins.push(new UglifyJSPlugin({ minimize: true }));
|
||||
|
||||
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue