Back to TIL
June 2025
posted on 06.14.2025

Remove debugger statements in Vite

We can use esbuild's drop option to remove console APIs and debugger statements from our code when we build our application.

export default defineConfig({
    esbuild: {
      drop: ['console', 'debugger']
    }
});
No reactions yet

2026.10.01 14:01:34 in Naperville, IL
Last visitor from Mitaka, Japan
Theme
Color theme
⌘K