Skip to content
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

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

patak-dev
Copy link
Member

Description

Cleanup and release notes


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@patak-dev patak-dev merged commit cf6c175 into main Dec 5, 2022
@patak-dev patak-dev deleted the chore/vite-4-beta-changelog branch December 5, 2022 16:30
Copy link
Member

@ArnaudBarre ArnaudBarre left a 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.
Copy link
Member

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.
Copy link
Member

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?

Copy link
Member Author

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.

?

Copy link
Member

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

packages/vite/CHANGELOG.md Show resolved Hide resolved
packages/vite/CHANGELOG.md Show resolved Hide resolved

#### 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.
Copy link
Member

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.

futurGH pushed a commit to futurGH/vite that referenced this pull request Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants