Turbopack: use ChunkGroupEntry::Shared, part 2#91279
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
42d13ec to
c06fa83
Compare
bc9cf2c to
5ce35de
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Collaborator
Tests Passed |
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
This was referenced Mar 12, 2026
5ce35de to
f617334
Compare
c06fa83 to
cf4dc27
Compare
f617334 to
7a620f4
Compare
372fe44 to
f7c4fb3
Compare
7a620f4 to
a9d5f25
Compare
e63dd0a to
de4534b
Compare
f7c4fb3 to
2596d96
Compare
de4534b to
f1eb8a9
Compare
2596d96 to
3c2709e
Compare
3c2709e to
d27300e
Compare
f1eb8a9 to
855f0a3
Compare
d27300e to
3171e2c
Compare
3171e2c to
a2bb760
Compare
sokra
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Followup to #90978, which fixed the
ChunkGroups passed to.chunk_group(), forgot to update the the module graph entry types, which didn't match up.The
ChunkGroupEntry::Shared(ResolvedVc::upcast(*server_component))one was more involved:layout.js [app-rsc] (Next.js Server Component)--ChunkingType::Shared-->layout.js [app-rsc](the actual module)Shared(server_component.await?.module)(the inner one)layout.js [app-rsc] (Next.js Server Component)module during the traversal, to infer the parent server component of the given subgraph.So instead, move to
loader-tree in the templatelayout.js [app-rsc] (Next.js Server Component)layout.js [app-rsc]The reason for that
ChunkingType::Sharedis so that we can chunk arbitrary modules that are loaded byChunkGroup::Entry. Meaning that we can dochunk_group(Shared(root_layout))).concat(chunk_group(Shared(layout))).concat(chunk_group(Entry(page)))and rely on turbotask caching to deduplicate layout chunking across pages.