Skip to content

docs(rsc): document stable client chunks - #1320

Open
hugosmoreira wants to merge 4 commits into
vitejs:mainfrom
hugosmoreira:docs/rsc-manual-chunks
Open

docs(rsc): document stable client chunks#1320
hugosmoreira wants to merge 4 commits into
vitejs:mainfrom
hugosmoreira:docs/rsc-manual-chunks

Conversation

@hugosmoreira

@hugosmoreira hugosmoreira commented Jul 26, 2026

Copy link
Copy Markdown

Description

Documents the Vite 8/Rolldown configuration for keeping client chunks stable and applies it to the plugin-rsc basic example while preserving the example's Vite 7 CI coverage.

The updated documentation and example:

  • use build.rolldownOptions.output.codeSplitting.groups
  • group React, React DOM, and the RSC browser runtime into lib-react
  • separate Vite's preload helper into lib-vite
  • use a functional group test so CommonJS proxy module IDs are still matched
  • detect Rolldown in the basic example and fall back to rollupOptions.output.manualChunks under Vite 7

Closes #865

Validation

  • pnpm -C packages/plugin-rsc build
  • pnpm -C packages/plugin-react build
  • pnpm -C packages/plugin-rsc tsc
  • pnpm -C packages/plugin-rsc/examples/basic build
  • oxfmt --check packages/plugin-rsc/README.md packages/plugin-rsc/examples/basic/vite.config.ts

@hugosmoreira
hugosmoreira marked this pull request as ready for review July 26, 2026 06:45

@hi-ogawa hi-ogawa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document should be fore Vite 8 rolldown.

Our examples/basic/vite.config.ts should also use that when running Vite 8.

Comment thread packages/plugin-rsc/examples/basic/vite.config.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document manualChunks example

2 participants