Skip to content

Clarify JSX parsing with Babel in installation guide - #8692

Open
sahilbhandare45 wants to merge 1 commit into
reactjs:mainfrom
sahilbhandare45:main
Open

sahilbhandare45 wants to merge 1 commit into
reactjs:mainfrom
sahilbhandare45:main

Conversation

@sahilbhandare45

Copy link
Copy Markdown

The Babel section of the installation page shows a config with only babel-plugin-react-compiler. Run directly (for example with @babel/cli) on .jsx files, that config stops with “Support for the experimental syntax ‘jsx’ isn’t currently enabled”, because the plugin doesn’t turn on JSX parsing and Babel fails before the compiler runs.

This adds a Note saying to include @babel/preset-react or @babel/plugin-syntax-jsx, and that presets run after plugins, so the compiler still runs first.

I checked this with @babel/core and @babel/cli 7.29 and 8.0 and babel-plugin-react-compiler 1.0.0: the plugin alone fails, adding either option compiles, and the output is memoized.

Related issue: react/react#37727

Add note about JSX parsing requirements when using Babel.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

This branch was successfully deployed

1 active deployment
Preview — 30c7c3c8 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant