Skip to content

Commit e726746

Browse files
committed
refactor!: remove old babel-plugin-react-compiler support
1 parent 1b4e0f0 commit e726746

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/plugin-react/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Remove old `babel-plugin-react-compiler` support that requires `runtimeModule` option
6+
7+
`runtimeModule` option is no longer needed in newer `babel-plugin-react-compiler` versions. Make sure to use a newer version of `babel-plugin-react-compiler` that supports `target` option.
8+
59
## 4.7.0 (2025-07-18)
610

711
### Add HMR support for compound components ([#518](https://github.com/vitejs/vite-plugin-react/pull/518))

packages/plugin-react/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,6 @@ function getReactCompilerRuntimeModule(
468468
if (Array.isArray(plugin)) {
469469
if (plugin[1]?.target === '17' || plugin[1]?.target === '18') {
470470
moduleName = 'react-compiler-runtime'
471-
} else if (typeof plugin[1]?.runtimeModule === 'string') {
472-
// backward compatibility from (#374), can be removed in next major
473-
moduleName = plugin[1]?.runtimeModule
474471
}
475472
}
476473
return moduleName

0 commit comments

Comments
 (0)