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: website/docs/en/plugins/list/plugin-react.mdx
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,15 @@ pluginReact({
108
108
});
109
109
```
110
110
111
+
### swcReactOptions.refresh
112
+
113
+
-**Type:**`boolean`
114
+
-**Default:** based on [fastRefresh](#fastrefresh) and [dev.hmr](/config/dev/hmr)
115
+
116
+
Whether to enable [React Fast Refresh](https://www.npmjs.com/package/react-refresh).
117
+
118
+
Most of the time, you should use the plugin's [fastRefresh](#fastrefresh) option to enable or disable Fast Refresh.
119
+
111
120
### splitChunks
112
121
113
122
When [chunkSplit.strategy](/config/performance/chunk-split) set to `split-by-experience`, Rsbuild will automatically split `react` and `router` related packages into separate chunks by default:
@@ -225,7 +234,9 @@ pluginReact({
225
234
-**Type:**`boolean`
226
235
-**Default:**`true`
227
236
228
-
Whether to enable React [Fast Refresh](https://www.npmjs.com/package/react-refresh) in development mode.
237
+
Whether to enable [React Fast Refresh](https://www.npmjs.com/package/react-refresh) in development mode.
238
+
239
+
If `fastRefresh` is set to `true`, `@rsbuild/plugin-react` will automatically register the [@rspack/plugin-react-refresh](https://www.npmjs.com/package/@rspack/plugin-react-refresh) plugin.
229
240
230
241
If you need to disable Fast Refresh, you can set it to `false`:
0 commit comments