Replies: 1 comment
-
|
This is running for me now, maybe they fixed it ? @SimonEast |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I asked a similar question on StackOverflow (https://stackoverflow.com/q/78451880/195835) but perhaps it's worth raising here, also. Here is what I tried adding to my
vite.config.js.For some reason the
dropoption does what it's supposed to (strips allconsole.*()calls), but thedropLabelsoption does not (well the labels get removed, but not the code next to the label). Some responses indicated that this is because esbuild is not used during production builds, but if that's the case, why does thedropoption work?To reproduce this, here's a simple StackBlitz that demonstrates it:
https://stackblitz.com/edit/vitejs-vite-4uczvd?file=src%2Fmain.js,vite.config.js&terminal=dev
(The dev server will run by default, and you can view the
console.log's by opening your browser dev tools. To run a production build, quit the dev server withQ,ENTERand then typenpm run build && cat dist/assets/index*.jsand you will see the production bundle JS output.)Beta Was this translation helpful? Give feedback.
All reactions