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
Copy file name to clipboardExpand all lines: packages/plugin-react-swc/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,14 @@ react({
117
117
})
118
118
```
119
119
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
+
120
128
## Consistent components exports
121
129
122
130
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).
Copy file name to clipboardExpand all lines: packages/plugin-react/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,10 @@ Otherwise, you'll probably get this error:
129
129
Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong.
130
130
```
131
131
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
+
132
136
## Consistent components exports
133
137
134
138
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