feat: suggest vite-plugin-react-oxc when using rolldown-vite#491
Conversation
…down-vite is detected
ArnaudBarre
left a comment
There was a problem hiding this comment.
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. |
sapphi-red
left a comment
There was a problem hiding this comment.
Would you add a changelog entry?
Co-authored-by: 翠 <green@sapphi.red>
Co-authored-by: 翠 <green@sapphi.red>
Co-authored-by: 翠 <green@sapphi.red>
Co-authored-by: 翠 <green@sapphi.red>
Co-authored-by: 翠 <green@sapphi.red>
| 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-viteand either:vite-plugin-react,vite-plugin-react-swc(without anyswcplugins set)It recommends using
vite-plugin-react-oxcand links to the Rolldown migration guide.I'm planning on adding info regarding
vite-plugin-react-oxcto it in another PR