Skip to content

Commit 7a9034f

Browse files
committed
fixup! feat(@angular/build): add prerenderFormat option to prerender routes as <route>.html
1 parent a6dd90a commit 7a9034f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • packages/angular/build/src/utils/server-rendering

‎packages/angular/build/src/utils/server-rendering/prerender.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ async function renderPages(
269269
const usedFiles = new Map<string, string>();
270270

271271
const baseHrefPathnameWithLeadingSlash = new URL(baseHref, 'http://localhost').pathname;
272+
const lowerIndexOutput = indexOutput?.toLowerCase();
272273
const appShellRouteWithoutBaseHref = appShellRoute
273274
? addLeadingSlash(getRouteWithoutBaseHref(appShellRoute, baseHrefPathnameWithLeadingSlash))
274275
: undefined;
@@ -286,7 +287,7 @@ async function renderPages(
286287
routeWithoutBaseHref,
287288
route,
288289
filePath,
289-
indexOutput,
290+
lowerIndexOutput,
290291
usedFiles,
291292
);
292293
if (reason) {
@@ -541,7 +542,7 @@ function getFileFormatConflict(
541542
routeWithoutBaseHref: string,
542543
route: string,
543544
filePath: string,
544-
indexOutput: string | undefined,
545+
lowerIndexOutput: string | undefined,
545546
usedFiles: ReadonlyMap<string, string>,
546547
): string | undefined {
547548
const routePath = getNormalizedRoutePath(routeWithoutBaseHref);
@@ -558,7 +559,7 @@ function getFileFormatConflict(
558559
}
559560

560561
const lowerFilePath = filePath.toLowerCase();
561-
if (indexOutput !== undefined && lowerFilePath === indexOutput.toLowerCase()) {
562+
if (lowerIndexOutput !== undefined && lowerFilePath === lowerIndexOutput) {
562563
return `'${filePath}' is the index file of the application`;
563564
}
564565

0 commit comments

Comments
 (0)