aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-24 05:40:29 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-24 05:42:03 +0800
commitd52c1310b28a574f9ef4fe558cfe1ef508a64d7c (patch)
tree5e5883719a8eadaa782e1cf97a285b9b9e2f7fe0 /packages/0x.js
parent6e27324a341801e1a2d8d6989d749dfe021ae39b (diff)
downloaddexon-0x-contracts-d52c1310b28a574f9ef4fe558cfe1ef508a64d7c.tar.gz
dexon-0x-contracts-d52c1310b28a574f9ef4fe558cfe1ef508a64d7c.tar.zst
dexon-0x-contracts-d52c1310b28a574f9ef4fe558cfe1ef508a64d7c.zip
Update uglify plugin to support es6
Diffstat (limited to 'packages/0x.js')
-rw-r--r--packages/0x.js/package.json3
-rw-r--r--packages/0x.js/webpack.config.js13
2 files changed, 12 insertions, 4 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 755de9e18..54a896bfc 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -17,7 +17,7 @@
"scripts": {
"watch_without_deps": "tsc -w",
"build": "yarn build:all",
- "build:all": "run-p build:umd:prod build:commonjs; exit 0;",
+ "build:all": "run-p build:umd:prod build:commonjs",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
@@ -70,6 +70,7 @@
"tslint": "5.11.0",
"typedoc": "0.12.0",
"typescript": "3.0.1",
+ "uglifyjs-webpack-plugin": "^1.3.0",
"webpack": "^3.1.0"
},
"dependencies": {
diff --git a/packages/0x.js/webpack.config.js b/packages/0x.js/webpack.config.js
index 2c1fe81a7..982e076ee 100644
--- a/packages/0x.js/webpack.config.js
+++ b/packages/0x.js/webpack.config.js
@@ -3,6 +3,7 @@
*/
const _ = require('lodash');
const webpack = require('webpack');
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const path = require('path');
const production = process.env.NODE_ENV === 'production';
@@ -27,10 +28,16 @@ module.exports = {
},
devtool: 'source-map',
plugins: [
- new webpack.optimize.UglifyJsPlugin({
- minimize: true,
+ // TODO: Revert to webpack bundled version with webpack v4.
+ // The v3 series bundled version does not support ES6 and
+ // fails to build.
+ new UglifyJsPlugin({
sourceMap: true,
- include: /\.min\.js$/,
+ uglifyOptions: {
+ mangle: {
+ reserved: ['BigNumber'],
+ },
+ },
}),
],
module: {