Skip to content

Commit

Permalink
[dynamicIO] unify cache filling and lazy-module warming (vercel#71749)
Browse files Browse the repository at this point in the history
We ended up with up to three prerender passes as we added support for
new use cases like lazy module initializaiton. This update refactors the
PPR pathway to have at most two renders.

I will follow up with a refactor of the non-ppr pathway next.
  • Loading branch information
gnoff authored Oct 23, 2024
1 parent 54768ac commit ab32cca
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 233 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ export async function createReactServerPrerenderResult(
while (true) {
const { done, value } = await reader.read()
if (done) {
break
return new ReactServerPrerenderResult(chunks)
} else {
chunks.push(value)
}
}
return new ReactServerPrerenderResult(chunks)
}

export async function createReactServerPrerenderResultFromRender(
Expand Down
Loading

0 comments on commit ab32cca

Please sign in to comment.