Skip to content

Commit aa7fb8f

Browse files
committed
[dynamicIO] Track module loading in dev always
In dev we prerender and render concurrently. The former to validation 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 hte 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 ea9585a commit aa7fb8f

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)