Skip to content

Commit

Permalink
暂无注释terser-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
aiplat committed May 19, 2021
1 parent ffba793 commit 9cbb316
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const devMode = process.env.NODE_ENV !== 'production';
const compressionWebpackPlugin = require('compression-webpack-plugin');
const terserPlugin = require("terser-webpack-plugin");
// const terserPlugin = require("terser-webpack-plugin");
const cssMinimizerPlugin = require('css-minimizer-webpack-plugin');

function resolve(dir) {
Expand Down Expand Up @@ -45,33 +45,33 @@ module.exports = {
new cssMinimizerPlugin(),
],
};
cfg.plugins.push(new terserPlugin({
terserOptions:{
ecma:undefined,
warnings:false,
parse:{},
compress:{
// drop_console:true,
// drop_debugger:false,
// pure_funcs:["console.log"]
},
mangle:true,
module:false,
output:null,
format:null,
toplevel:false,
nameCache:null,
ie8:false,
keep_classnames:undefined,
keep_fnames:false,
safari10:false,
extractComments:false,
format:{
comments:false,
},
},
extractComments:false,
}));
// cfg.plugins.push(new terserPlugin({
// terserOptions:{
// ecma:undefined,
// warnings:false,
// parse:{},
// compress:{
// // drop_console:true,
// // drop_debugger:false,
// // pure_funcs:["console.log"]
// },
// mangle:true,
// module:false,
// output:null,
// format:null,
// toplevel:false,
// nameCache:null,
// ie8:false,
// keep_classnames:undefined,
// keep_fnames:false,
// safari10:false,
// extractComments:false,
// format:{
// comments:false,
// },
// },
// extractComments:false,
// }));
}
cfg.resolve.extensions = ['.ts', '.js', '.vue', '.json'];
cfg.resolve.alias = {
Expand Down

0 comments on commit 9cbb316

Please sign in to comment.