summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/angry-cows-hug.md5
-rw-r--r--packages/astro/src/core/build/generate.ts21
2 files changed, 14 insertions, 12 deletions
diff --git a/.changeset/angry-cows-hug.md b/.changeset/angry-cows-hug.md
new file mode 100644
index 000000000..4a3813117
--- /dev/null
+++ b/.changeset/angry-cows-hug.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes an issue where logs that weren't grouped together by route when building the app.
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());