Skip to content

Fix RSC loading unnecessary bundles#10104

Merged
devongovett merged 2 commits into
v2from
rsc-isolated
Mar 14, 2025
Merged

Fix RSC loading unnecessary bundles#10104
devongovett merged 2 commits into
v2from
rsc-isolated

Conversation

@devongovett

Copy link
Copy Markdown
Member

When using "use server-entry" in a nested dependency, for example to load either one component or another, separate bundles get created correctly but both still get downloaded even when only one of them is rendered. This PR fixes that issue by stopping at isolated bundle boundaries when traversing the list of referenced bundles. Instead of these bundles being hoisted into the root page's resources, they are loaded on demand when rendered by React. Therefore only the scripts for the rendered components are loaded.

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.

1 participant