Explorar o código

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

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
ed02a5c421
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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,