Skip to content

Commit

Permalink
fix(@angular/build): skip wildcard routes from being listed as preren…
Browse files Browse the repository at this point in the history
…dered routes

This fix ensures that the wildcard routes are not included in the prerendered list, improving the accuracy of prerendered route generation.

(cherry picked from commit 8f6ee1a)
  • Loading branch information
alan-agius4 committed Nov 6, 2024
1 parent 408ca40 commit cf0228b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ export async function executePostBundleSteps(
case /* Legacy building mode */ undefined: {
if (!metadata.redirectTo) {
serializableRouteTreeNodeForManifest.push(metadata);
prerenderedRoutes[metadata.route] = { headers: metadata.headers };

if (!metadata.route.includes('*')) {
prerenderedRoutes[metadata.route] = { headers: metadata.headers };
}
}
break;
}
Expand Down

0 comments on commit cf0228b

Please sign in to comment.