webpack prod removes console.log, + minor adjustments
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
const merge = require('webpack-merge')
|
||||
const baseConfig = require('./webpack.config.base')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
module.exports = merge(baseConfig, {
|
||||
mode: 'production',
|
||||
@@ -16,6 +17,19 @@ module.exports = merge(baseConfig, {
|
||||
},
|
||||
},
|
||||
},
|
||||
minimizer: [new UglifyJsPlugin({
|
||||
sourceMap:true,
|
||||
cache: true,
|
||||
parallel: true,
|
||||
uglifyOptions:{
|
||||
ecma:8,
|
||||
compress: {
|
||||
// drop_console: true
|
||||
pure_funcs: ['console.log']
|
||||
}
|
||||
},
|
||||
exclude: 'vendor.js',
|
||||
})]
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
||||
Reference in New Issue
Block a user