refactor(template): disable global partial prefetching#384
Open
laugharn wants to merge 1 commit into
Open
Conversation
Flip `partialPrefetching` from `true` to `false` in next.config.ts, backing out the partial-prefetch experiment (#322). The key stays present (explicitly `false`) to document the deliberate choice. `partialPrefetching` only sets the default route-segment prefetch strategy for segments that don't export their own `prefetch`. With it off, those segments revert from `'partial'` (App-Shell-only prefetch on in-viewport links) to Next's standard prefetch default. `search` is the only route that still exports `prefetch = "allow-runtime"`, so it is unaffected; home, PDP, and the collection routes move back to the default. `cacheComponents` stays on, so partial *prerendering* (PPR) is unchanged — the static-shell routes still report ◐ in the route table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Flip
partialPrefetchingfromtruetofalseinapps/template/next.config.ts, backing out the partial-prefetch experiment from #322. The key is kept (explicitlyfalse) to document the deliberate choice rather than relying on the implicit default.Why it matters
partialPrefetchingis the global default for a route segment's prefetch strategy — but only for segments that don't export their ownprefetch. Next resolves it as:true: segments without aprefetchexport default to'partial', so an in-viewport<Link>(theprefetch: 'auto'default) carries only the per-route App Shell.false: those segments fall back to Next's standard prefetch default (undefined).Routes that export their own
prefetchare unaffected. In this template,app/search/page.tsxis the only such route (prefetch = "allow-runtime"), so it keeps runtime prefetch either way. Home, PDP,collections/[handle], andcollections/allcurrently rely on the global default, so this change moves them off'partial'back to standard prefetch.cacheComponents: truestays on (a hard requirement forpartialPrefetchingwhen truthy), so this is the only edit needed and partial prerendering (PPR) is untouched — the static-shell routes still report ◐ in the route table.Validation
tsc --noEmitpnpm --filter template lint(oxlint +oxfmt --check)Rollout log
Adds
packages/plugin/template-rollout-log/2026-06-22-disable-partial-prefetching.md(defaultAction: review) so downstream storefronts can reason about adopting/skipping the revert. No docs update —partialPrefetchingisn't referenced inapps/docs.Notes
main(supersedes the earlier closed refactor(template): disable global partial prefetching #374, which was identical but ~7 commits behind).prefetch = "allow-runtime"exports and the droppedprefetch={true}links (refactor(template): drop forced prefetch={true} from product cards and menu links #369) stay as-is — they remain valid; only the global default changes.🤖 Generated with Claude Code