[Compiler Bug]: babel seems to not apply `babel-plugin-react-compiler`
Author: gottfried-githubCreated Oct 1, 2026Updated Oct 1, 2026
LabelsType: BugStatus: Unconfirmed
What kind of issue is this?
- 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
https://github.com/gottfried-github/react-compiler-issue
Repro steps
In the repro repo, run npx babel src --out-dir dist-test --extensions .js,.jsx,.cjs,.mjs. I.e.,
- install
@babel/core,@babel/cliandbabel-plugin-react-compiler - add some
.jsxcode - add the following
babel.config.json:
{
"plugins": ["babel-plugin-react-compiler"]
}- run
npx babel src --out-dir dist-test --extensions .js,.jsx,.cjs,.mjs
This gives me the following error: "Support for the experimental syntax 'jsx' isn't currently enabled (2:10)" (see repro).
osmomysl@jet:~/house/operational/react-compiler-issue/babel-8$ npx babel src --out-dir dist-test --extensions .js,.jsx,.cjs,.mjs
SyntaxError: /home/osmomysl/house/operational/react-compiler-issue/babel-8/src/App.jsx: Support for the experimental syntax 'jsx' isn't currently enabled (2:10):
1 | const App = () => {
> 2 | return <div>Hello World!</div>;
| ^
3 | };
4 |
5 | // const App = () => {
Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx) to the 'plugins' section to enable parsing.
If you already added the plugin for this syntax to your config, it's possible that your config isn't being loaded.
You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:
npx cross-env BABEL_SHOW_CONFIG_FOR=/home/osmomysl/house/operational/react-compiler-issue/babel-8/src/App.jsx <your build command>
See https://babeljs.io/docs/configuration#print-effective-configs for more info.
at constructor (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:325:19)
at Parser.raise (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:6397:19)
at Parser.expectOnePlugin (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:6431:18)
at Parser.parseExprAtom (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:8135:24)
at Parser.parseExprSubscripts (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7816:23)
at Parser.parseUpdate (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7801:21)
at Parser.parseMaybeUnary (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7781:23)
at Parser.parseMaybeUnaryOrPrivate (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7653:61)
at Parser.parseExprOps (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7657:23)
at Parser.parseMaybeConditional (file:///home/osmomysl/house/operational/react-compiler-issue/babel-8/node_modules/@babel/parser/lib/index.js:7635:23) {
code: 'BABEL_PARSE_ERROR',
reasonCode: 'MissingOneOfPlugins',
loc: Position { line: 2, column: 9, index: 29 },
pos: 29,
syntaxPlugin: undefined,
missingPlugin: [ 'jsx', 'flow', 'typescript' ]
}At the same time, if I add a different plugin to the babel config, it works properly on .js files (see repro).
How often does this bug happen?
Every time
What version of React are you using?
19.3.0
What version of React Compiler are you using?
1.0.0 (babel-plugin-react-compiler)
Source: react/react