diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts index 1556f0b2f95c..6de384fc3d0d 100644 --- a/packages/astro/src/core/build/page-data.ts +++ b/packages/astro/src/core/build/page-data.ts @@ -30,13 +30,19 @@ export function collectPagesData(opts: CollectPagesDataOptions): CollectPagesDat // and is then cached across all future SSR builds. In the past, we've had trouble // with parallelized builds without guaranteeing that this is called first. + let exit = false for (const route of manifest.routes) { // There's special handling in SSR for (const component of DEFAULT_COMPONENTS) { if (route.component === component) { - continue; + exit = true + break; } } + if (exit) { + exit = false + continue; + } // Generate a unique key to identify each page in the build process. const key = makePageDataKey(route.route, route.component); // static route: