@vitejs/plugin-react
6.3.0 · 9 Nov 2026MIT142M / weekRepositoryHomepagenpmAtom feed
6.3.0 is the newest release of 6.x.
In short
4 removed1 new
- Removed
Remove Babel Related Features
- Removed
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.
- Removed
Drop Vite 7 and below support
- Removed
Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8.
Release note
Remove Babel Related Features
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:
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:
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
Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.