diff --git a/webpack.prod.js b/webpack.prod.js index f6d3a08..3dd0b9e 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -1,9 +1,24 @@ const merge = require('webpack-merge'); const common = require('./webpack.common.js'); +const TerserPlugin = require('terser-webpack-plugin'); module.exports = merge(common, { mode: 'production', devtool: 'source-map', + optimization: { + minimizer: [ + new TerserPlugin({ + cache: true, + parallel: true, + sourceMap: true, + terserOptions: { + compress: { + pure_funcs: [ 'console.log' ] + } + } + }) + ] + }, module: { rules: [ {