Skip to content

Commit 30c7c3c

Browse files
Clarify JSX parsing with Babel in installation guide
Add note about JSX parsing requirements when using Babel.
1 parent 046f17d commit 30c7c3c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/content/learn/react-compiler/installation.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ module.exports = {
6262
};
6363
```
6464

65+
<Note>
66+
The compiler plugin does not turn on JSX parsing by itself. If you run Babel directly (for example with `@babel/cli`) on files that contain JSX, also add `@babel/preset-react` or `@babel/plugin-syntax-jsx`. Without one of them, Babel stops with "Support for the experimental syntax 'jsx' isn't currently enabled" before the compiler runs. Presets run after plugins, so the compiler still runs first.
67+
</Note>
68+
6569
### Vite {/*vite*/}
6670

6771
If you use Vite with version 6.0.0 or later of `@vitejs/plugin-react`, you can use the `reactCompilerPreset`:

0 commit comments

Comments
 (0)