1.生产环境去除console.log
build 文件夹下webpack.prod.conf.js文件中添加
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_debugger: true,
drop_console: true
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),