Browse Source

vite build drop console

bach 11 months ago
parent
commit
560c4eda72
1 changed files with 9 additions and 0 deletions
  1. 9 0
      vite.config.js

+ 9 - 0
vite.config.js

@@ -35,4 +35,13 @@ export default defineConfig({
      },
      },
     },
     },
   },
   },
+  build: {
+    rollupOptions: {
+      // https://rollupjs.org/configuration-options/
+    },
+  },
+  // https://github.com/vitejs/vite/discussions/7920
+  esbuild: {
+    drop: ['console', 'debugger'],
+  },
 })
 })