webpack: use uglify-es for node.

This commit is contained in:
Christopher Jeffrey 2017-07-05 16:41:58 -07:00
parent 8d6f8f7cdf
commit 1bd42c526a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2,6 +2,7 @@
const webpack = require('webpack') const webpack = require('webpack')
const path = require('path'); const path = require('path');
const UglifyEsPlugin = require('uglify-es-webpack-plugin');
const str = JSON.stringify; const str = JSON.stringify;
const env = process.env; const env = process.env;
@ -37,6 +38,7 @@ module.exports = {
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.BCOIN_WORKER_FILE': 'process.env.BCOIN_WORKER_FILE':
str(env.BCOIN_WORKER_FILE || 'bcoin-worker.js') str(env.BCOIN_WORKER_FILE || 'bcoin-worker.js')
}) }),
new UglifyEsPlugin()
] ]
}; };