Merge pull request #1006 from 0xProject/fix/0x.js/uglify-plugin
[0x.js] Update uglify plugin to support es6
This commit is contained in:
commit
2c660e62d3
@ -17,7 +17,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"watch_without_deps": "tsc -w",
|
"watch_without_deps": "tsc -w",
|
||||||
"build": "yarn build:all",
|
"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/**/*",
|
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
|
||||||
"test:circleci": "run-s test:coverage",
|
"test:circleci": "run-s test:coverage",
|
||||||
"test": "yarn run_mocha",
|
"test": "yarn run_mocha",
|
||||||
@ -70,6 +70,7 @@
|
|||||||
"tslint": "5.11.0",
|
"tslint": "5.11.0",
|
||||||
"typedoc": "0.12.0",
|
"typedoc": "0.12.0",
|
||||||
"typescript": "3.0.1",
|
"typescript": "3.0.1",
|
||||||
|
"uglifyjs-webpack-plugin": "^1.3.0",
|
||||||
"webpack": "^3.1.0"
|
"webpack": "^3.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const production = process.env.NODE_ENV === 'production';
|
const production = process.env.NODE_ENV === 'production';
|
||||||
|
|
||||||
@ -27,10 +28,16 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
// TODO: Revert to webpack bundled version with webpack v4.
|
||||||
minimize: true,
|
// The v3 series bundled version does not support ES6 and
|
||||||
|
// fails to build.
|
||||||
|
new UglifyJsPlugin({
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
include: /\.min\.js$/,
|
uglifyOptions: {
|
||||||
|
mangle: {
|
||||||
|
reserved: ['BigNumber'],
|
||||||
|
},
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
module: {
|
module: {
|
||||||
|
13
yarn.lock
13
yarn.lock
@ -13929,6 +13929,19 @@ uglifyjs-webpack-plugin@^1.2.5:
|
|||||||
webpack-sources "^1.1.0"
|
webpack-sources "^1.1.0"
|
||||||
worker-farm "^1.5.2"
|
worker-farm "^1.5.2"
|
||||||
|
|
||||||
|
uglifyjs-webpack-plugin@^1.3.0:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz#75f548160858163a08643e086d5fefe18a5d67de"
|
||||||
|
dependencies:
|
||||||
|
cacache "^10.0.4"
|
||||||
|
find-cache-dir "^1.0.0"
|
||||||
|
schema-utils "^0.4.5"
|
||||||
|
serialize-javascript "^1.4.0"
|
||||||
|
source-map "^0.6.1"
|
||||||
|
uglify-es "^3.3.4"
|
||||||
|
webpack-sources "^1.1.0"
|
||||||
|
worker-farm "^1.5.2"
|
||||||
|
|
||||||
uid-number@0.0.6, uid-number@^0.0.6:
|
uid-number@0.0.6, uid-number@^0.0.6:
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
|
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user