Преглед изворни кода

feat: 生产环境时清除console以及debugger

lanjianrong пре 4 година
родитељ
комит
ed02a5c421
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      config/webpack.config.js

+ 2 - 0
config/webpack.config.js

@@ -237,6 +237,8 @@ module.exports = function(webpackEnv) {
               // Pending further investigation:
               // https://github.com/terser-js/terser/issues/120
               inline: 2,
+              drop_console: isEnvProduction,
+              drop_debugger: isEnvProduction
             },
             mangle: {
               safari10: true,