parent
ffa744bdd1
commit
2e8b90110a
@ -0,0 +1,28 @@ |
||||
|
||||
const path = require('path'); |
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); |
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; |
||||
|
||||
|
||||
//console.log(process.env.NODE_ENV);
|
||||
//process.exit();
|
||||
|
||||
|
||||
const plugins = []; |
||||
if (process.env.NODE_ENV === 'disc') |
||||
plugins.push(new BundleAnalyzerPlugin()); |
||||
|
||||
module.exports = { |
||||
mode: 'production', |
||||
entry: './dist/es/browserify.index.js', |
||||
optimization: { |
||||
minimizer: [ |
||||
new UglifyJsPlugin() |
||||
] |
||||
}, |
||||
plugins, |
||||
output: { |
||||
path: path.resolve(__dirname, '../test_tmp'), |
||||
filename: 'webpack.bundle.js' |
||||
} |
||||
}; |
Loading…
Reference in new issue