Open openks opened 7 years ago
只需修改webpack的配置文件即可关闭生产环境console
//build/webpack.prod.env.js new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, drop_console: true,//默认关闭所有console pure_funcs: ['console.log']//配置需关闭的console 如果不配置默认关闭全部 如果配置则只关闭已经配置的 }, sourceMap: false })
相关连接: https://jeffjade.com/2017/08/06/124-webpack-packge-optimization-for-volume/ webapck配置
只需修改webpack的配置文件即可关闭生产环境console
相关连接:
https://jeffjade.com/2017/08/06/124-webpack-packge-optimization-for-volume/
webapck配置