在webpack.prod.conf.js里面的plugins里面加上
drop_debugger: true, drop_console: true
new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, drop_debugger: true, drop_console: true }, sourceMap: true }),
参考链接 https://webpack.js.org/configuration/plugins/
时间: 2024-10-12 02:45:52