Explorar el Código

fix: 修复esbuild的drop_console (#2542)

ZhangZhiChao hace 2 años
padre
commit
32daad6198
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      vite.config.ts

+ 1 - 1
vite.config.ts

@@ -61,7 +61,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
       proxy: createProxy(VITE_PROXY),
     },
     esbuild: {
-      pure: VITE_DROP_CONSOLE ? ['console.log', 'debugger'] : [],
+      drop: VITE_DROP_CONSOLE ? ['console', 'debugger'] : [],
     },
     build: {
       target: 'es2015',