Skip to content

Commit 7bcd46a

Browse files
authored
[dynamicIO] Track module loading in dev always (vercel#81388)
In dev we prerender and render concurrently. The former to validate dynamicIO rules. The latter to stream a response as soon as possible. If we only track module loading during prerenders it is possible to kick off loading a chunk during the render and then not observe that chunk load during prerender, leading to an early abort before all modules have had a chance to load. To solve this we simply always track module loading in dev.
1 parent f4f0c44 commit 7bcd46a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/next/src/server/app-render/app-render.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@ async function renderToHTMLOrFlightImpl(
12211221
if (!renderOpts.experimental.dynamicIO) {
12221222
return false
12231223
}
1224+
if (renderOpts.dev) {
1225+
return true
1226+
}
12241227
const workUnitStore = workUnitAsyncStorage.getStore()
12251228
return !!(
12261229
workUnitStore &&

0 commit comments

Comments
 (0)