Skip to content

Commit d52a6c2

Browse files
docs: info for oxc option
1 parent 0979cd1 commit d52a6c2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/plugin-react-swc/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ react({
117117
})
118118
```
119119

120+
### disableOxcRecommendation
121+
122+
If set, disables the recommendation to use `vite-plugin-react-oxc` (which is shown when `rolldown-vite` is detected and neither `swc` plugins are used nor the `swc` options are mutated).
123+
124+
```ts
125+
react({ disableOxcRecommendation: true })
126+
```
127+
120128
## Consistent components exports
121129

122130
For React refresh to work correctly, your file should only export React components. The best explanation I've read is the one from the [Gatsby docs](https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works).

packages/plugin-react/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ Otherwise, you'll probably get this error:
129129
Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong.
130130
```
131131

132+
### disableOxcRecommendation
133+
134+
If set, disables the recommendation to use `vite-plugin-react-oxc` (which is shown when `rolldown-vite` is detected and `babel` is not configured).
135+
132136
## Consistent components exports
133137

134138
For React refresh to work correctly, your file should only export React components. You can find a good explanation in the [Gatsby docs](https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works).

0 commit comments

Comments
 (0)