Skip to content

Commit 00336c0

Browse files
committed
fix(@angular-devkit/build-angular): ensure route has leading slash in prerender builder
Ensures that the route always starts with a leading slash when calling the render function, preventing potential issues with relative paths or incorrect URL resolution during prerendering. (cherry picked from commit 30d8332)
1 parent f0073d1 commit 00336c0

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/prerender

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/builders/prerender/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ async function _renderUniversal(
217217
inlineCriticalCss: !!normalizedStylesOptimization.inlineCritical,
218218
minifyCss: !!normalizedStylesOptimization.minify,
219219
outputPath,
220-
route,
220+
route: route[0] === '/' ? route : '/' + route,
221221
serverBundlePath,
222222
};
223223

0 commit comments

Comments
 (0)