diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/astro/src/core/build/generate.ts | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 99a7ad121..99912ba27 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -249,13 +249,11 @@ async function generatePage( // prepare information we need const logger = pipeline.getLogger(); const config = pipeline.getConfig(); - const manifest = pipeline.getManifest(); const pageModulePromise = ssrEntry.page; const onRequest = ssrEntry.onRequest; const pageInfo = getPageDataByComponent(pipeline.getInternals(), pageData.route.component); // Calculate information of the page, like scripts, links and styles - const hoistedScripts = pageInfo?.hoistedScript ?? null; const styles = pageData.styles .sort(cssOrder) .map(({ sheet }) => sheet) @@ -294,6 +292,15 @@ async function generatePage( }; // Now we explode the routes. A route render itself, and it can render its fallbacks (i18n routing) for (const route of eachRouteInRouteData(pageData)) { + const icon = + route.type === 'page' || route.type === 'redirect' || route.type === 'fallback' + ? green('▶') + : magenta('λ'); + if (isRelativePath(route.component)) { + logger.info(null, `${icon} ${route.route}`); + } else { + logger.info(null, `${icon} ${route.component}`); + } // Get paths for the route, calling getStaticPaths if needed. const paths = await getPathsForRoute(route, pageModule, pipeline, builtPaths); let timeStart = performance.now(); @@ -515,16 +522,6 @@ async function generatePath( } } - const icon = - route.type === 'page' || route.type === 'redirect' || route.type === 'fallback' - ? green('▶') - : magenta('λ'); - if (isRelativePath(route.component)) { - logger.info(null, `${icon} ${route.route}`); - } else { - logger.info(null, `${icon} ${route.component}`); - } - // This adds the page name to the array so it can be shown as part of stats. if (route.type === 'page') { addPageName(pathname, pipeline.getStaticBuildOptions()); |