mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #1011] Add waitForAllReady forkpoint to renderToNodeFizzStream for prerenderToStream #225
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @github-actions[bot] on GitHub (May 2, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/1011
Upstream change
Next.js re-landed a change to
renderToNodeFizzStream(Node runtime) that adds a thirdoptionsargument with awaitForAllReadyflag. When set, the pipeable React stream is connected to the outputPassThroughonly afteronAllReadyfires, instead of ononShellReady. This effectively gives the prerender path its own forkpoint: the static prerender can wait for the full tree before emitting bytes, while normal SSR keeps streaming as soon as the shell is ready.The web variant (
stream-ops.web.ts) accepts the same option for signature parity but does not change behavior yet.github.com/vercel/next.js@b2491e30cbRelevant diff (
packages/next/src/server/app-render/stream-ops.node.ts):app-render.tsxis also updated to thread this option throughprerenderToStreamso static prerenders can opt into the deferred pipe.Why this matters for vinext
vinext targets Cloudflare Workers, so the web renderer (
renderToReadableStream) is the primary path and this change is signature-only there. However:generateStaticParamsbuild step that needs the full tree before flushing, we should mirror thiswaitForAllReadyforkpoint instead of relying ononShellReady.allReadywhen producing static HTML for Cloudflare (e.g. ISR cache writes), since the static output should not be a shell + suspended stream.This is mainly a tracking item: confirm vinext's prerender code path equivalents pipe only after
allReadyfor static output, both on the Node dev path and the web/Workers prerender path used for ISR.Suggested work
waitForAllReadyoption to the equivalent stream helper.