diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index 63f84fbdf..7c45fca58 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Remove old `babel-plugin-react-compiler` support that requires `runtimeModule` option + +`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. + ### Require Node 20.19+, 22.12+ This plugin now requires Node 20.19+ or 22.12+. diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index ff31bd450..88ebe367f 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -471,9 +471,6 @@ function getReactCompilerRuntimeModule( if (Array.isArray(plugin)) { if (plugin[1]?.target === '17' || plugin[1]?.target === '18') { moduleName = 'react-compiler-runtime' - } else if (typeof plugin[1]?.runtimeModule === 'string') { - // backward compatibility from (#374), can be removed in next major - moduleName = plugin[1]?.runtimeModule } } return moduleName