28 lines
763 B
JavaScript
28 lines
763 B
JavaScript
const baseConfig = require('./webpack.base.js');
|
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
const { EnvWebPackage } = require('./webpack.plugin.js');
|
|
|
|
module.exports = Object.assign({}, baseConfig, {
|
|
optimization: {
|
|
minimizer: [
|
|
new TerserPlugin({
|
|
terserOptions: {
|
|
output: {
|
|
comments: false
|
|
}
|
|
},
|
|
extractComments: false
|
|
})
|
|
]
|
|
},
|
|
plugins: [
|
|
...baseConfig.plugins,
|
|
new EnvWebPackage({
|
|
entry: baseConfig.entry,
|
|
output: baseConfig.output.path,
|
|
env: "prod"
|
|
}),
|
|
],
|
|
devtool: 'cheap-module-souce-map',
|
|
mode: 'production',
|
|
}); |