next.js
b7e32858 - [turbopack] Generate component chunks for each merged group to increase cache hits (#95261)

Commit
81 days ago
[turbopack] Generate component chunks for each merged group to increase cache hits (#95261) This is a WIP PR to attempt to achieve this: <img width="653" height="291" alt="Screenshot 2026-06-28 at 11 53 17 pm" src="https://github.com/user-attachments/assets/68a78003-b76c-40e2-bbea-ca581f468eef" /> This does involve emitting extra chunks, though in theory, they are already being emitted. I'm reusing the `module_chunks` field on `OutputChunkRuntimeInfo`: ```rust /// List of paths of chunks containing individual modules that are part of /// this chunk. This is useful for selectively loading modules from a chunk /// without loading the whole chunk. pub module_chunks: Option<ResolvedVc<OutputAssets>>, ``` This does cause larger build sizes: | App | Client chunk files (baseline → PR) | Difference | Client chunk bytes (baseline → PR) | Difference | | --- | ---: | ---: | ---: | ---: | | vercel-site | 3651 → 5245 | +1594 (43.7%) | 344.5 MiB → 418.4 MiB | +73.9 MiB (21.5%) | | vercel-marketing | 2242 → 2634 | +392 (17.5%) | 163.5 MiB → 180.7 MiB | +17.2 MiB (10.5%) | | **Total** | **5893 → 7879** | **+1986 (33.7%)** | **508.0 MiB → 599.1 MiB** | **+91.1 MiB (17.9%)** |
Author
Parents
Loading