Skip to content

Commit 8ea9eda

Browse files
Copilothi-ogawaclaude
authored
docs(plugin-rsc): clarify arbitrary React version support for security updates (#1018)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 239a25b commit 8ea9eda

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

packages/plugin-rsc/README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,11 @@ export function Page() {
445445
}
446446
```
447447

448-
### Using React Canary and Experimental versions
448+
### Using different React versions
449449

450-
To use React's [canary](https://react.dev/community/versioning-policy#canary-channel) or [experimental](https://react.dev/community/versioning-policy#all-release-channels) versions with `@vitejs/plugin-rsc`, you have two options:
450+
By default, `@vitejs/plugin-rsc` includes a [vendored version](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-rsc/package.json#L64) of `react-server-dom-webpack`. When `react-server-dom-webpack` is installed in your project's dependencies, the plugin will automatically use it instead, allowing you to use any React version you need.
451451

452-
**Option 1: Use preview releases from pkg.pr.new**
453-
454-
You can use preview releases that bundle specific React versions. See [PR #524](https://github.com/vitejs/vite-plugin-react/pull/524) for instructions on installing these preview packages.
455-
456-
**Option 2: Install `react-server-dom-webpack` directly**
457-
458-
By default, `@vitejs/plugin-rsc` includes a vendored version of `react-server-dom-webpack`. However, when `react-server-dom-webpack` is installed in your project's dependencies, the plugin will automatically use it instead. This allows you to:
459-
460-
- Stay up-to-date with the latest React Server Components runtime without waiting for plugin updates
461-
- Use specific React versions (stable, canary, or experimental)
462-
463-
Simply install the version you need:
452+
**[Canary](https://react.dev/community/versioning-policy#canary-channel) or [experimental](https://react.dev/community/versioning-policy#experimental-channel) versions:**
464453

465454
```json
466455
{
@@ -472,14 +461,14 @@ Simply install the version you need:
472461
}
473462
```
474463

475-
Or for experimental:
464+
**Specific versions (e.g., for security updates):**
476465

477466
```json
478467
{
479468
"dependencies": {
480-
"react": "experimental",
481-
"react-dom": "experimental",
482-
"react-server-dom-webpack": "experimental"
469+
"react": "19.2.3",
470+
"react-dom": "19.2.3",
471+
"react-server-dom-webpack": "19.2.3"
483472
}
484473
}
485474
```

0 commit comments

Comments
 (0)