-
-
Notifications
You must be signed in to change notification settings - Fork 181
feat: suggest vite-plugin-react-oxc
when using rolldown-vite
#491
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
feat: suggest vite-plugin-react-oxc
when using rolldown-vite
#491
Conversation
…down-vite is detected
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.
I think that's a good way to make people aware of it, but maybe we should provide a way to disable the warning, but one extra config field for this feels too much. I'm curious of the opinion of other team member @patak-dev @sapphi-red @hi-ogawa
Thanks for your notes!
I had the same thoughts and didn't come up with a better solution so far. But maybe we could use an env var instead to avoid "one more config option" and cater to the needs of the few who want to disable it? 🤔 |
I agree that there should be a way to disable the warning. If the idea is making vite-plugin-react-oxc the default, I think it is ok to have an option in the other plugins config to disable it. |
Added |
This isn't directly related, but implementing vitejs/vite#19937 in the future could help users filter out certain warnings more easily. |
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.
Would you add a changelog entry?
Co-authored-by: 翠 <[email protected]>
Co-authored-by: 翠 <[email protected]>
Co-authored-by: 翠 <[email protected]>
Co-authored-by: 翠 <[email protected]>
Co-authored-by: 翠 <[email protected]>
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.5.0 | 4.5.2 | ## [v4.5.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#452-2025-06-10) ##### Suggest `@vitejs/plugin-react-oxc` if rolldown-vite is detected [#491](vitejs/vite-plugin-react#491) Emit a log which recommends `@vitejs/plugin-react-oxc` when `rolldown-vite` is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting `disableOxcRecommendation: false` in the plugin options. ##### Use `optimizeDeps.rollupOptions` instead of `optimizeDeps.esbuildOptions` for rolldown-vite [#489](vitejs/vite-plugin-react#489) This suppresses the warning about `optimizeDeps.esbuildOptions` being deprecated in rolldown-vite. ##### Add Vite 7-beta to peerDependencies range [#497](vitejs/vite-plugin-react#497) React plugins are compatible with Vite 7, this removes the warning when testing the beta. ## [v4.5.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#451-2025-06-03) ##### Add explicit semicolon in preambleCode [#485](vitejs/vite-plugin-react#485) This fixes an edge case when using HTML minifiers that strips line breaks aggressively.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.5.0 | 4.5.2 | ## [v4.5.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#452-2025-06-10) ##### Suggest `@vitejs/plugin-react-oxc` if rolldown-vite is detected [#491](vitejs/vite-plugin-react#491) Emit a log which recommends `@vitejs/plugin-react-oxc` when `rolldown-vite` is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting `disableOxcRecommendation: false` in the plugin options. ##### Use `optimizeDeps.rollupOptions` instead of `optimizeDeps.esbuildOptions` for rolldown-vite [#489](vitejs/vite-plugin-react#489) This suppresses the warning about `optimizeDeps.esbuildOptions` being deprecated in rolldown-vite. ##### Add Vite 7-beta to peerDependencies range [#497](vitejs/vite-plugin-react#497) React plugins are compatible with Vite 7, this removes the warning when testing the beta. ## [v4.5.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#451-2025-06-03) ##### Add explicit semicolon in preambleCode [#485](vitejs/vite-plugin-react#485) This fixes an edge case when using HTML minifiers that strips line breaks aggressively.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.5.0 | 4.6.0 | ## [v4.6.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#460-2025-06-23) ##### Add raw Rolldown support This plugin only worked with Vite. But now it can also be used with raw Rolldown. The main purpose for using this plugin with Rolldown is to use react compiler. ## [v4.5.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#452-2025-06-10) ##### Suggest `@vitejs/plugin-react-oxc` if rolldown-vite is detected [#491](vitejs/vite-plugin-react#491) Emit a log which recommends `@vitejs/plugin-react-oxc` when `rolldown-vite` is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting `disableOxcRecommendation: false` in the plugin options. ##### Use `optimizeDeps.rollupOptions` instead of `optimizeDeps.esbuildOptions` for rolldown-vite [#489](vitejs/vite-plugin-react#489) This suppresses the warning about `optimizeDeps.esbuildOptions` being deprecated in rolldown-vite. ##### Add Vite 7-beta to peerDependencies range [#497](vitejs/vite-plugin-react#497) React plugins are compatible with Vite 7, this removes the warning when testing the beta. ## [v4.5.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#451-2025-06-03) ##### Add explicit semicolon in preambleCode [#485](vitejs/vite-plugin-react#485) This fixes an edge case when using HTML minifiers that strips line breaks aggressively.
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 4.5.0 | 4.6.0 | ## [v4.6.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#460-2025-06-23) ##### Add raw Rolldown support This plugin only worked with Vite. But now it can also be used with raw Rolldown. The main purpose for using this plugin with Rolldown is to use react compiler. ## [v4.5.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#452-2025-06-10) ##### Suggest `@vitejs/plugin-react-oxc` if rolldown-vite is detected [#491](vitejs/vite-plugin-react#491) Emit a log which recommends `@vitejs/plugin-react-oxc` when `rolldown-vite` is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting `disableOxcRecommendation: false` in the plugin options. ##### Use `optimizeDeps.rollupOptions` instead of `optimizeDeps.esbuildOptions` for rolldown-vite [#489](vitejs/vite-plugin-react#489) This suppresses the warning about `optimizeDeps.esbuildOptions` being deprecated in rolldown-vite. ##### Add Vite 7-beta to peerDependencies range [#497](vitejs/vite-plugin-react#497) React plugins are compatible with Vite 7, this removes the warning when testing the beta. ## [v4.5.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#451-2025-06-03) ##### Add explicit semicolon in preambleCode [#485](vitejs/vite-plugin-react#485) This fixes an edge case when using HTML minifiers that strips line breaks aggressively.
Description
This PR introduces a log (warn) when using
rolldown-vite
and either:vite-plugin-react
,vite-plugin-react-swc
(without anyswc
plugins set)It recommends using
vite-plugin-react-oxc
and links to the Rolldown migration guide.I'm planning on adding info regarding
vite-plugin-react-oxc
to it in another PR