diff options
Diffstat (limited to 'packages/website/webpack.config.js')
-rw-r--r-- | packages/website/webpack.config.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index e28e9e064..b5e9cf6dd 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'], @@ -24,6 +25,11 @@ module.exports = { { test: /\.js$/, loader: 'source-map-loader', + exclude: [ + // instead of /\/node_modules\// + path.join(process.cwd(), 'node_modules'), + path.join(process.cwd(), '../..', 'node_modules'), + ], }, { test: /\.tsx?$/, @@ -76,9 +82,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'], + }, }, }), ] |