init commit
This commit is contained in:
23
webpack.prod.js
Normal file
23
webpack.prod.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const baseConfig = require('./webpack.base.js');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const { EnvWebPackage } = require('./webpack.plugin.js');
|
||||
|
||||
module.exports = Object.assign({}, baseConfig, {
|
||||
plugins: [
|
||||
...baseConfig.plugins,
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
}
|
||||
}),
|
||||
new EnvWebPackage({
|
||||
entry: baseConfig.entry,
|
||||
output: baseConfig.output.path,
|
||||
env: "prod"
|
||||
}),
|
||||
],
|
||||
devtool: 'cheap-module-souce-map',
|
||||
mode: 'production',
|
||||
});
|
||||
Reference in New Issue
Block a user