next.js
5c6481eb - Discriminate prefetch() from URL data in static shell validation

Commit
5 days ago
Discriminate prefetch() from URL data in static shell validation With `ensureStatic` at `'shell'` or higher, validation renders a static App Shell, where `prefetch()` and URL data both resolved in `PrefetchStatic` and an unguarded `prefetch()` was reported as URL data. Add `PrefetchStatic_prefetch`, a discrimination-only stage between `ShellStatic` and `PrefetchStatic`. `prefetch()` resolves there in static renders, and the static validation sequence maps it to the prefetch() hole kind, mirroring `PrefetchRuntime` on the runtime side. Nothing else is gated on the stage, and `advanceStage` resolves it on the way to `PrefetchStatic`. Update the prefetch()-outside-Suspense snapshots under `'shell'`, `'prefetch'`, and `'navigation'` to expect the prefetch() message. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
Parents
Loading