@@ -238,17 +238,30 @@ export const copyPrerenderedContent = async (ctx: PluginContext): Promise<void>
238238 }
239239 } ) ,
240240 ) ,
241- ...ctx . getFallbacks ( manifest ) . map ( async ( route ) => {
242- const key = routeToFilePath ( route )
243- const value = await buildPagesCacheValue (
244- join ( ctx . publishDir , 'server/pages' , key ) ,
245- undefined ,
246- shouldUseEnumKind ,
247- true , // there is no corresponding json file for fallback, so we are skipping it for this entry
248- )
249-
250- await writeCacheEntry ( key , value , Date . now ( ) , ctx )
251- } ) ,
241+ ...ctx . getFallbacks ( manifest ) . map ( ( route ) =>
242+ limitConcurrentPrerenderContentHandling ( async ( ) => {
243+ const key = routeToFilePath ( route )
244+ const value = await buildPagesCacheValue (
245+ join ( ctx . publishDir , 'server/pages' , key ) ,
246+ undefined ,
247+ shouldUseEnumKind ,
248+ true , // there is no corresponding json file for fallback, so we are skipping it for this entry
249+ )
250+
251+ await writeCacheEntry ( key , value , Date . now ( ) , ctx )
252+ } ) ,
253+ ) ,
254+ ...ctx . getShells ( manifest ) . map ( ( route ) =>
255+ limitConcurrentPrerenderContentHandling ( async ( ) => {
256+ const key = routeToFilePath ( route )
257+ const value = await buildAppCacheValue (
258+ join ( ctx . publishDir , 'server/app' , key ) ,
259+ shouldUseAppPageKind ,
260+ )
261+
262+ await writeCacheEntry ( key , value , Date . now ( ) , ctx )
263+ } ) ,
264+ ) ,
252265 ] )
253266
254267 // app router 404 pages are not in the prerender manifest
0 commit comments