Skip to content

Commit 71c4d53

Browse files
docs(rolldown): add @vitejs/plugin-react-oxc recommendation (vitejs#20152)
1 parent 7b7410a commit 71c4d53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/guide/rolldown.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ Thanks to Rolldown and Oxc, various internal Vite plugins, such as the alias or
109109

110110
To test them, you can set the `experimental.enableNativePlugin` option to `true` in your Vite config.
111111

112+
### `@vitejs/plugin-react-oxc`
113+
114+
When using `@vitejs/plugin-react` or `@vitejs/plugin-react-swc`, you can switch to the `@vitejs/plugin-react-oxc` plugin, which uses Oxc for React's fast-refresh instead of Babel or SWC. It is designed to be a drop-in replacement, providing better build performance and aligning with the underlying architecture of `rolldown-vite`.
115+
116+
Be aware that you can only switch to `@vitejs/plugin-react-oxc` if you are not using any Babel or SWC plugins (including the React compiler), or mutate the SWC options.
117+
112118
### `withFilter` Wrapper
113119

114120
Plugin authors have the option to use the [hook filter feature](#hook-filter-feature) to reduce the communication overhead between the Rust and JavaScript runtimes.

0 commit comments

Comments
 (0)