Skip to content

Commit 0d4e2bc

Browse files
style: Fix lint issues
1 parent 6767bd9 commit 0d4e2bc

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/angular/build/src/utils/index-file/augment-index-html.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,10 @@ export async function augmentIndexHtml(
163163
if (sri && chunksIntegrity?.size) {
164164
const integrity: Record<string, string> = {};
165165
// Stable iteration order for reproducible builds.
166-
const sortedKeys = [...chunksIntegrity.keys()].sort();
167-
for (const url of sortedKeys) {
168-
integrity[generateUrl(url, deployUrl)] = chunksIntegrity.get(url)!;
166+
const sortedEntries = [...chunksIntegrity.entries()]
167+
.sort(([keyA], [keyB]) => keyA.localeCompare(keyB));
168+
for (const [url, integrityHash] of sortedEntries) {
169+
integrity[generateUrl(url, deployUrl)] = integrityHash;
169170
}
170171
headerLinkTags.push(
171172
`<script type="importmap">${JSON.stringify({ integrity })}</script>`,

packages/angular/build/src/utils/index-file/index-html-generator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface IndexHtmlGeneratorOptions {
4949
imageDomains?: string[];
5050
generateDedicatedSSRContent?: boolean;
5151
autoCsp?: AutoCspOptions;
52+
5253
/**
5354
* Integrity metadata for module URLs not directly referenced in the index
5455
* (typically lazy-loaded chunks). Forwarded to {@link augmentIndexHtml} so

0 commit comments

Comments
 (0)