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-rsc/README.md
+37-6Lines changed: 37 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -445,9 +445,44 @@ export function Page() {
445
445
}
446
446
```
447
447
448
-
### Canary and Experimental channel releases
448
+
### Using React Canary and Experimental versions
449
449
450
-
See https://github.com/vitejs/vite-plugin-react/pull/524 for how to install the package for React [canary](https://react.dev/community/versioning-policy#canary-channel) and [experimental](https://react.dev/community/versioning-policy#all-release-channels) usages.
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:
451
+
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.
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:
464
+
465
+
```json
466
+
{
467
+
"dependencies": {
468
+
"react": "canary",
469
+
"react-dom": "canary",
470
+
"react-server-dom-webpack": "canary"
471
+
}
472
+
}
473
+
```
474
+
475
+
Or for experimental:
476
+
477
+
```json
478
+
{
479
+
"dependencies": {
480
+
"react": "experimental",
481
+
"react-dom": "experimental",
482
+
"react-server-dom-webpack": "experimental"
483
+
}
484
+
}
485
+
```
451
486
452
487
### Using `@vitejs/plugin-rsc` as a framework package's `dependencies`
453
488
@@ -561,10 +596,6 @@ Note that while there are official npm packages [`server-only`](https://www.npmj
561
596
562
597
This build-time validation is enabled by default and can be disabled by setting `validateImports:false` in the plugin options.
563
598
564
-
### `react-server-dom-webpack`
565
-
566
-
Currently `@vitejs/plugin-rsc` includes a vendored version of `react-server-dom-webpack`. However, when `react-server-dom-webpack` is installed in user project's dependencies, the plugin will automatically use it instead. This allows you to stay up-to-date with the latest React Server Components runtime without waiting for plugin updates.
567
-
568
599
## Credits
569
600
570
601
This project builds on fundamental techniques and insights from pioneering Vite RSC implementations.
0 commit comments