-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
refactor(esbuild)!: remove esbuild 0.17 -> 0.18 compat #14804
Conversation
Run & review this pull request in StackBlitz Codeflow. |
docs/guide/migration.md
Outdated
@@ -117,6 +117,31 @@ CLI shortcuts, like `r` to restart the dev server, now require an additional `En | |||
|
|||
This change prevents Vite from swallowing and controlling OS-specific shortcuts, allowing better compatibility when combining the Vite dev server with other processes, and avoids the [previous caveats](https://github.com/vitejs/vite/pull/14342). | |||
|
|||
### Update `experimentalDecorators` and `useDefineForClassFields` TypeScript behaviour | |||
|
|||
Vite 5 uses esbuild 0.18, which changes how `experimentalDecorators` and `useDefineForClassFields` are handled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vite 5 uses esbuild 0.19 (#14430). So I think we need to say it like "we removed the compat layer".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah we should mention it's 0.19 now. I point out as 0.18 as the main compat layer was for 0.18. 0.19 was not much breaking I believe. I can update it before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration guide can be tweaked later so I think it's fine to merge it to test out the changes.
/ecosystem-ci run |
📝 Ran ecosystem CI on
|
Description
Removed esbuild 0.17 to 0.18 compat code we added in Vite 4. I only saw this comment that we should remove this in Vite 5 just now 😬
experimentalDecorators
needs to be enabled if usedsupported
handling foruseDefineForClassFields
. I figured it's better to document what's happening and how they can fix it. I initially thought we could respectesbuild.compilerOptions.target
and overrideesbuild.target
if set, but I don't think it's worth breaking that now, nor a good default. This is also esbuild's behaviour.I added some documentation to explain what's going on.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).