From f8b8d9ce5448be70bcfda1c75212907e0cb07eaa Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Thu, 13 Jun 2024 15:45:16 +0200 Subject: [PATCH] fix: handle prerendered ppr rsc --- src/build/content/prerendered.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/build/content/prerendered.ts b/src/build/content/prerendered.ts index a64061d145..14dcab8972 100644 --- a/src/build/content/prerendered.ts +++ b/src/build/content/prerendered.ts @@ -85,7 +85,9 @@ const buildAppCacheValue = async ( return { kind: 'APP_PAGE', html, - rscData: await readFile(`${path}.rsc`, 'base64'), + rscData: await readFile(`${path}.rsc`, 'base64').catch(() => + readFile(`${path}.prefetch.rsc`, 'base64'), + ), ...meta, } }