How to remove console.log ,when vite build use esbuild? #7920
Replies: 5 comments 21 replies
-
Have the same confusion, can anyone provide a solution? |
Beta Was this translation helpful? Give feedback.
-
use minify: 'terser' to build is slower then minify: 'esbuild' 44 seconds terser build cost 78.73s ========== |
Beta Was this translation helpful? Give feedback.
-
export default defineConfig({
esbuild: {
drop: ['console', 'debugger'],
},
}); |
Beta Was this translation helpful? Give feedback.
-
@blinpete if I want to remove |
Beta Was this translation helpful? Give feedback.
-
you can try this plugin vite-plugin-remove-console |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
vite.config.js
===============================
I want to use esbuild to build,because because esbuild so faster then terser,but how can i remove console.log ,use esbuild
Beta Was this translation helpful? Give feedback.
All reactions