-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
chore: vite 4 beta changelog cleanup and release notes #11200
Conversation
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.
Thanks for writing this and the cleanup. The last section feels still a bit too much like a git log, but we can improve this later
|
||
##### @vitejs/plugin-react-swc (new) | ||
|
||
[@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) is a new plugin that uses esbuild during build, but replaces Babel with SWC during development. For big projects that don't require non-standard React extensions, HMR will be significantly faster. |
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.
HMR and cold starts will be significantly faster.
|
||
#### New React plugin using SWC during development | ||
|
||
[SWC](https://swc.rs/) is now a mature option for [Babel](https://babeljs.io/). SWC's Fast Refresh implementation is a lot faster than Babel, and for some projects, it is now a better alternative. |
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.
Is a word missing in the first sentence or this is an english form I'm not used to?
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.
Should it be:
SWC is now a mature replacement for Babel.
?
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.
this sounds better for me, but maybe french bias
|
||
#### Compatibility | ||
|
||
The modern browser build now targets `safari14` by default for wider ES2020 compatibility (https://github.com/vitejs/vite/issues/9063). This means that by default [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) doesn't need to be polyfilled and [nullish coallessing](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing) isn't transpiled anymore. If you need to support older browsers, you can add [`@vitejs/plugin-legacy`](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy) as usual. |
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.
Putting a note here that BigInt can't be polyfilled. That's why we get a fair amount of issues previously as esbuild will error directly if it encounters one.
Description
Cleanup and release notes
What is the purpose of this pull request?