在build webpack.prod.conf.js
	new UglifyJsPlugin({
  		uglifyOptions: {
    	compress: {
      	warnings: false,
      	drop_debugger: true, 
      	drop_console: true // 打包之后关闭console.log
   	 }
  	},
  	sourceMap: config.build.productionSourceMap,
  	parallel: true

转载于:https://my.oschina.net/pingheyongfeng/blog/3004078

Logo

前往低代码交流专区

更多推荐