|
@@ -2,6 +2,7 @@ const path = require('path');
|
|
|
const postcssPxToViewport = require('./postcss.config');
|
|
|
const vueSrc = 'src';
|
|
|
const CDN_URL = process.env.CDN_URL || '';
|
|
|
+const TerserPlugin = require('terser-webpack-plugin')
|
|
|
|
|
|
module.exports = {
|
|
|
publicPath:
|
|
@@ -74,6 +75,8 @@ module.exports = {
|
|
|
return newArgs;
|
|
|
})
|
|
|
.end();
|
|
|
+ // 编译之后清理console.log
|
|
|
+ config.optimization.minimizer('vue').use(TerserPlugin, [{ terserOptions: { compress: { drop_console: true } } }])
|
|
|
},
|
|
|
configureWebpack: {
|
|
|
resolve: {
|