Browse Source

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

lanjianrong 4 years ago
parent
commit
ed02a5c421
1 changed files with 2 additions and 0 deletions
  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,