Back to TIL
June 2025
posted on 06.15.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

in Naperville, IL
Last visitor from Mitaka, Japan