-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vite-plugin): production builds (fix: #17267) #17272
base: dev
Are you sure you want to change the base?
Conversation
Hi @yurks , Thank you for contributing! The problem with this is that the "vite preview" command is run by default with "serve" command and "production" mode. As per the Vite docs on the "vite preview" cmd: "Locally preview the production build". If we only look at the command as in this PR, then "vite preview" will produce a hybrid compilation, wrongly assuming it's a "dev" build. What are your thoughts on this? |
|
@rstoenescu but preview could be run with another mode, like And yes, I forgot about preview ;) It looks like more correct condition for enabling tree-shaking would be |
@yurks I think the best solution may be to directly check To maintain the fix for Vitest in Issue #15997 (PR #15999), instead of
Using @rstoenescu's comparison table:
|
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
dev
branch (orv[X]
branch)fix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: