打包支持
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
const baseConfig = require('./webpack.base.js');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
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 UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
output: {
|
||||
comments: false
|
||||
}
|
||||
}
|
||||
}),
|
||||
new EnvWebPackage({
|
||||
entry: baseConfig.entry,
|
||||
output: baseConfig.output.path,
|
||||
|
||||
Reference in New Issue
Block a user