Skip to content

Commit 005f16e

Browse files
authored
refactor!: remove old babel-plugin-react-compiler support (#584)
1 parent b9efa3f commit 005f16e

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
### Require Node 20.19+, 22.12+
610

711
This plugin now requires Node 20.19+ or 22.12+.

packages/plugin-react/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,6 @@ function getReactCompilerRuntimeModule(
471471
if (Array.isArray(plugin)) {
472472
if (plugin[1]?.target === '17' || plugin[1]?.target === '18') {
473473
moduleName = 'react-compiler-runtime'
474-
} else if (typeof plugin[1]?.runtimeModule === 'string') {
475-
// backward compatibility from (#374), can be removed in next major
476-
moduleName = plugin[1]?.runtimeModule
477474
}
478475
}
479476
return moduleName

0 commit comments

Comments
 (0)