在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/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-04-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案