aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/webpack.config.js
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-05 01:59:55 +0800
committerFabio Berger <me@fabioberger.com>2018-10-05 01:59:55 +0800
commit3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e (patch)
tree87bda5d41b34973960ec230dfb9320e54aea6588 /packages/0x.js/webpack.config.js
parente7ab9938ce5bde17600130584fc75bc8a45f6dc5 (diff)
parent2da7626b5356f7b0ec809719f1b9da14b2969a07 (diff)
downloaddexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar.gz
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar.bz2
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar.lz
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar.xz
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.tar.zst
dexon-sol-tools-3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e.zip
merge developmemnt
Diffstat (limited to 'packages/0x.js/webpack.config.js')
-rw-r--r--packages/0x.js/webpack.config.js31
1 files changed, 13 insertions, 18 deletions
diff --git a/packages/0x.js/webpack.config.js b/packages/0x.js/webpack.config.js
index 1ad0a79ec..397faa76f 100644
--- a/packages/0x.js/webpack.config.js
+++ b/packages/0x.js/webpack.config.js
@@ -2,8 +2,7 @@
* This is to generate the umd bundle only
*/
const _ = require('lodash');
-const webpack = require('webpack');
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
+const TerserPlugin = require('terser-webpack-plugin');
const path = require('path');
const production = process.env.NODE_ENV === 'production';
@@ -16,6 +15,7 @@ if (production) {
module.exports = {
entry,
+ mode: 'production',
output: {
path: path.resolve(__dirname, '_bundles'),
filename: '[name].js',
@@ -27,19 +27,18 @@ module.exports = {
extensions: ['.ts', '.js', '.json'],
},
devtool: 'source-map',
- plugins: [
- // 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,
- uglifyOptions: {
- mangle: {
- reserved: ['BigNumber'],
+ optimization: {
+ minimizer: [
+ new TerserPlugin({
+ sourceMap: true,
+ terserOptions: {
+ mangle: {
+ reserved: ['BigNumber'],
+ },
},
- },
- }),
- ],
+ }),
+ ],
+ },
module: {
rules: [
{
@@ -59,10 +58,6 @@ module.exports = {
],
exclude: /node_modules/,
},
- {
- test: /\.json$/,
- loader: 'json-loader',
- },
],
},
};