next.js
abbd100a - Fix prefetch hints not being loaded during revalidation

Commit
132 days ago
Fix prefetch hints not being loaded during revalidation The prefetch hints manifest was not loaded during revalidation renders, causing all segments to fall back to PrefetchDisabled — effectively disabling prefetching for that route until the next full build. The app-page template handler constructs its own renderOpts from scratch without including prefetch-hints.json. Normal requests go through the server's renderOpts (which loads the manifest at startup), but background revalidation renders go through the template handler, so the hints were always empty. Load the manifest in the route module's loadManifests() and pass it through to renderOpts. Also fix the fallback behavior when no hints exist in the manifest. Without cacheComponents, dynamic pages have no static shell and therefore no prerender pass to compute hints. Previously this fell back to PrefetchDisabled, which blocked all prefetching. Now we pass null hints to skip the inlining system and let prefetching proceed normally.
Author
Committer
Parents
Loading