feat(react): add native React Compiler support - #1419
Merged
Conversation
Boshen
force-pushed
the
agent/react-compiler
branch
from
August 10, 2026 01:57
0aaf260 to
89c2017
Compare
hi-ogawa
reviewed
Aug 10, 2026
Boshen
marked this pull request as ready for review
August 10, 2026 08:56
ArnaudBarre
reviewed
Aug 10, 2026
ArnaudBarre
left a comment
Member
There was a problem hiding this comment.
I'm wondering if we would not have better stability by always using oxc-transform-react. You could then remove react refresh from the builtin oxc-transform, making it a lot more vendor neutral.
That's a trade off, because it would be a bit slower for people not using the compiler, but in my experience the overhead is not visible in real Vite application (and in build mode without compiler, the builtin transform could still be used)
sapphi-red
reviewed
Aug 17, 2026
sapphi-red
approved these changes
Aug 17, 2026
Member
Author
|
Release plan: merge this integration PR, then after today's Oxc release ( |
Member
Author
|
@sapphi-red handing over to you and the team. |
ArnaudBarre
reviewed
Aug 17, 2026
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
ArnaudBarre
approved these changes
Aug 17, 2026
This was referenced Aug 18, 2026
sapphi-red
reviewed
Aug 19, 2026
cursor Bot
pushed a commit
to sanity-io/pkg-utils
that referenced
this pull request
Aug 19, 2026
…in-react main vitejs/vite-plugin-react#1419 is merged (f1340b0c); the tarball now builds from that canonical commit instead of the fork PR head (the only source change is an @experimental JSDoc tag on the compiler option). The npm release is queued as @vitejs/plugin-react@6.1.0 in vitejs/vite-plugin-react#1428 — vendor/README.md tracks the swap plan. Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
Merged
3 tasks
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Aug 21, 2026
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 6.0.2 | 6.1.0 | ## [v6.1.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#610-2026-08-19) ##### Add experimental native React Compiler support ([#1419](vitejs/vite-plugin-react#1419)) Add experimental native React Compiler support. You can use it by installing `oxc-transform-react` and enabling it via the `compiler` option: ```sh npm install -D oxc-transform-react ``` ```js import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [ react({ compiler: true }) ] }) ``` ## [v6.0.5](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#605-2026-07-30) ##### Fixed the react compiler preset filter to be linear ([#1353](vitejs/vite-plugin-react#1353)) The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](vitejs/vite-plugin-react#1349)). The filter was changed to be linear to avoid that. ## [v6.0.4](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#604-2026-07-22) ##### Fixed `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production` When running `vite dev` with `NODE_ENV=production`, the app errored with `$RefreshSig$ is not defined`. This error is now fixed. ## [v6.0.3](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#603-2026-06-23)
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Aug 21, 2026
| datasource | package | from | to | | ---------- | -------------------- | ----- | ----- | | npm | @vitejs/plugin-react | 6.0.2 | 6.1.0 | ## [v6.1.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#610-2026-08-19) ##### Add experimental native React Compiler support ([#1419](vitejs/vite-plugin-react#1419)) Add experimental native React Compiler support. You can use it by installing `oxc-transform-react` and enabling it via the `compiler` option: ```sh npm install -D oxc-transform-react ``` ```js import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [ react({ compiler: true }) ] }) ``` ## [v6.0.5](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#605-2026-07-30) ##### Fixed the react compiler preset filter to be linear ([#1353](vitejs/vite-plugin-react#1353)) The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](vitejs/vite-plugin-react#1349)). The filter was changed to be linear to avoid that. ## [v6.0.4](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#604-2026-07-22) ##### Fixed `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production` When running `vite dev` with `NODE_ENV=production`, the app errored with `$RefreshSig$ is not defined`. This error is now fixed. ## [v6.0.3](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#603-2026-06-23)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
compileroption backed by the optionaloxc-transform-reactpackage.When enabled,
oxc-transform-reactowns the React Compiler, TypeScript/JSX, and Fast Refresh transforms in one pass, while Rolldown React transforms are disabled. React Compiler and Fast Refresh remain client-only; server environments use the same package for TypeScript/JSX.Keeping React Compiler in a separate package avoids adding framework-specific compiler size and complexity to Rolldown.