fix(rsc): skip client entry mismatch without injections#14018
Conversation
📦 Binary Size-limit
🙈 Size remains the same at 61.97MB |
Rsdoctor Bundle Diff AnalysisFound 6 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new RSC config-case to ensure builds don’t fail with “client entry mismatch” diagnostics when there are no client injections and no CSS imports to inject.
Changes:
- Add a new
rsc-service-no-client-injectionconfig-case with minimal server/client entries. - Update the RSC client plugin to skip mismatch handling when there’s nothing to inject (no client entries + no CSS).
- Avoid a potential panic by replacing an
unwrap()withif let Some(...).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/test.config.js | Config-case bundle selection for the new scenario. |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/framework/rsc-service.rsc.js | Adds an RSC entry that exercises import.meta.rspackRsc. |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/framework/entry.ssr.js | SSR entry that consumes the RSC entry. |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/framework/entry.rsc.js | RSC entry with assertion validating the output. |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/framework/entry.client.js | Empty client entry for “no injection” scenario. |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/RscService.js | Server-entry module using rspackRsc.loadCss(). |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/src/App.js | Minimal server-entry app returning "main". |
| tests/rspack-test/configCases/rsc-plugin/rsc-service-no-client-injection/rspack.config.js | Two-compiler setup for server (node) + client (web) using RSC plugins. |
| crates/rspack_plugin_rsc/src/client_plugin.rs | Skips mismatch when no injections; avoids unwrap panic when entry is missing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Related links
Checklist