You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Compiler Bug]: babel-plugin-react-compiler bundles an outdated @babel/core and semver #38392
React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
babel-plugin-react-compiler (build issue installing or using the Babel plugin)
eslint-plugin-react-hooks (build issue installing or using the eslint plugin)
react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
Not app-specific: static check of the published npm tarball (steps below).
Repro steps
[email protected] (current latest) ships dist/index.js, a tsup bundle that keeps only @babel/types external. It inlines a full @babel/core 7.2.0 (the copy behind the exported runBabelPluginReactCompiler helper) and its semver 5.7.1. Both come from the dev setup in compiler/packages/babel-plugin-react-compiler/package.json ("resolutions": { "@babel/core": "7.2.0" }), and compiler/yarn.lock on main still resolves semver@^5.4.1, semver@^5.6.0 to 5.7.1.
These versions are covered by two published advisories (list below), fixed in semver 5.7.2 and @babel/core 7.29.6. Neither is a dependency of the published package, so npm audit and SCA tools cannot see these copies, for you or for projects that install the plugin. (The open PR #37478 raises the declared @babel/core range of eslint-plugin-react-hooks for the same @babel/core advisory; it does not change this bundled copy.)
Suggested fix: bump the @babel/core resolution to 7.29.6 or later (which uses semver 6.3.1) and rebuild, or, if 7.2.0 is pinned on purpose, add @babel/core to external in tsup.config.ts so the plugin uses the project's own Babel.
Static reproduction (2026-11-25):
npm pack [email protected] && tar xzf babel-plugin-react-compiler-1.0.0.tgz
Activity