diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-05-22 20:52:30 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-05-22 21:19:40 +0800 |
commit | f657a3d811461cd7924fa1f949bcde610aa22fef (patch) | |
tree | 27ef95b02c6ac5fcacda09edcf2bd534dd9870fb /packages/website/webpack.config.js | |
parent | b39f75a2e328bc48e99a705973a7b364f3866719 (diff) | |
download | dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar.gz dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar.bz2 dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar.lz dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar.xz dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.tar.zst dexon-0x-contracts-f657a3d811461cd7924fa1f949bcde610aa22fef.zip |
Upgrade UglifyJS to include ES6 support
Diffstat (limited to 'packages/website/webpack.config.js')
-rw-r--r-- | packages/website/webpack.config.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index e28e9e064..f9abeb27c 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const webpack = require('webpack'); +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') module.exports = { entry: ['./ts/index.tsx'], @@ -76,9 +77,14 @@ module.exports = { NODE_ENV: JSON.stringify(process.env.NODE_ENV), }, }), - new webpack.optimize.UglifyJsPlugin({ - mangle: { - except: ['BigNumber'], + // TODO: Revert to webpack bundled version with webpack v4. + // The v3 series bundled version does not support ES6 and + // fails to build. + new UglifyJsPlugin({ + uglifyOptions: { + mangle: { + reserved: ['BigNumber'], + }, }, }), ] |