# @vitejs/plugin-react: what changed from 5 to 6 - Product: @vitejs/plugin-react (https://whatsnew.fyi/product/vite-plugin-react) - Vendor: Vite - Range: changelog entries numbered after 5.2.0 up to and including 6.1.1, stable releases only - Entries below: 8 releases (newest first) - Resolved: 5 is 5.2.0 and 6 is 6.1.1, the newest stable release of each major we track - Carrying security changes: 0 · CVEs mentioned: 0 · Mentioning breaking changes: 0 · Removing or deprecating something: 1 - Page: https://whatsnew.fyi/product/vite-plugin-react/compare/5...6 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (11 changes, grouped by kind) ### Added #### 6.1.1 (2026-08-28) - Add `compiler.logDiagnostics` option to control logging of recoverable React Compiler diagnostics #### 6.1.0 (2026-08-20) - Experimental native React Compiler support via the compiler option #### 6.0.0 (2026-03-12) - Export reactCompilerPreset for easier setup of React compiler with Babel ### Changed #### 6.1.1 (2026-08-28) - Recoverable React Compiler diagnostics are no longer logged by default #### 6.0.2 (2026-05-14) - Allow all options in reactCompilerPreset instead of just compilationMode and target #### 6.0.1 (2026-03-13) - Expand @rolldown/plugin-babel peer dependency range to include ^0.2.0 ### Fixed #### 6.1.1 (2026-08-28) - React Compiler transform now respects environment sourcemap option instead of top-level sourcemap option when `builder.sharedPlugins` is enabled #### 6.0.5 (2026-07-30) - React compiler preset filter to be linear to avoid performance regression #### 6.0.4 (2026-07-22) - Fix $RefreshSig$ is not defined error when running vite dev with NODE_ENV=production ### Removed #### 6.0.0 (2026-03-12) - Babel is no longer a dependency and Babel-related configuration options are removed - Support for Vite 7 and below _One release carries no categorized changes yet: 6.0.3._ ## Release notes ### 6.1.1 - Date: 2026-08-28 - Version: 6.1.1 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.1 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.1.1 - **added** — Add `compiler.logDiagnostics` option to control logging of recoverable React Compiler diagnostics - **changed** — Recoverable React Compiler diagnostics are no longer logged by default - **fixed** — React Compiler transform now respects environment sourcemap option instead of top-level sourcemap option when `builder.sharedPlugins` is enabled ###### Add `compiler.logDiagnostics` option Recoverable React Compiler diagnostics are no longer logged by default. Set `compiler.logDiagnostics` to `true` to log them through Vite. Fatal diagnostics are always logged and fail the transform. ###### Respect environment sourcemap option for React Compiler transform when `builder.sharedPlugins` is enabled ([#1439](https://github.com/vitejs/vite-plugin-react/pull/1439)) The React Compiler transform was using the top-level sourcemap option instead of the environment sourcemap option. This caused a problem when the experimental `builder.sharedPlugins` was enabled. ### 6.1.0 - Date: 2026-08-20 - Version: 6.1.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.1.0 - **added** — Experimental native React Compiler support via the compiler option ###### Add experimental native React Compiler support ([#1419](https://github.com/vitejs/vite-plugin-react/pull/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 }) ] }) ``` ### 6.0.5 - Date: 2026-07-30 - Version: 6.0.5 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.5 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.5 - **fixed** — React compiler preset filter to be linear to avoid performance regression ###### Fixed the react compiler preset filter to be linear ([#1353](https://github.com/vitejs/vite-plugin-react/pull/1353)) The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](https://github.com/vitejs/vite-plugin-react/issues/1349)). The filter was changed to be linear to avoid that. ### 6.0.4 - Date: 2026-07-22 - Version: 6.0.4 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.4 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.4 - **fixed** — Fix $RefreshSig$ is not defined error when running vite dev with NODE_ENV=production ###### 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. ### 6.0.3 - Date: 2026-06-23 - Version: 6.0.3 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.3 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.3 ### 6.0.2 - Date: 2026-05-14 - Version: 6.0.2 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.2 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.2 - **changed** — Allow all options in reactCompilerPreset instead of just compilationMode and target ###### Allow all options in reactCompilerPreset ([#1189](https://github.com/vitejs/vite-plugin-react/pull/1189)) This is a type only change. Only `compilationMode` and `target` options were available for `reactCompilerPreset`. ### 6.0.1 - Date: 2026-03-13 - Version: 6.0.1 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.1 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.1 - **changed** — Expand @rolldown/plugin-babel peer dependency range to include ^0.2.0 ###### Expand `@rolldown/plugin-babel` peer dep range ([#1146](https://github.com/vitejs/vite-plugin-react/pull/1146)) Expanded `@rolldown/plugin-babel` peer dep range to include `^0.2.0`. ### 6.0.0 - Date: 2026-03-12 - Version: 6.0.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.0 - **removed** — Babel is no longer a dependency and Babel-related configuration options are removed - **removed** — Support for Vite 7 and below - **added** — Export reactCompilerPreset for easier setup of React compiler with Babel ###### Remove Babel Related Features ([#1123](https://github.com/vitejs/vite-plugin-react/pull/1123)) Vite 8+ can handle React Refresh Transform by Oxc and doesn't need Babel for it. With that, there are no transform applied that requires Babel. To reduce the installation size of this plugin, babel is no longer a dependency of this plugin and the related features are removed. If you are using Babel, you can use `@rolldown/plugin-babel` together with this plugin: ```diff import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['@babel/plugin-proposal-throw-expressions'], - }, - }), + react(), + babel({ + plugins: ['@babel/plugin-proposal-throw-expressions'], + }), ] }) ``` For React compiler users, you can use `reactCompilerPreset` for easier setup with preconfigured filter to improve build performance: ```diff import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import react, { reactCompilerPreset } from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['babel-plugin-react-compiler'], - }, - }), + react(), + babel({ + presets: [reactCompilerPreset()] + }), ] }) ``` ###### Drop Vite 7 and below support ([#1124](https://github.com/vitejs/vite-plugin-react/pull/1124)) Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8.