Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/angular/build/src/tools/i18n/i18n-inliner-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import remapping, { type DecodedSourceMap, type SourceMapInput } from '@ampproject/remapping';
import { type DecodedSourceMap, type SourceMapInput } from '@ampproject/remapping';
import {
type ɵParsedTranslation,
ɵisMissingTranslationError,
Expand Down Expand Up @@ -156,6 +156,8 @@ const deserializedTranslations = new Map<string, Promise<Record<string, ɵParsed
*/
let currentGeneration: number | undefined;

let remapping: typeof import('@ampproject/remapping').default | undefined;

/**
* Retrieves the file data for a filename, loading and extracting localization metadata.
* If `cache` is true, the result is cached in `fileDataCache` across requests in this Worker.
Expand Down Expand Up @@ -558,6 +560,7 @@ async function inlineLocalize(
includeContent: true,
hires: 'boundary',
});
remapping ??= (await import('@ampproject/remapping')).default;
outputMap = remapping([{ ...rawMap, version: 3 } satisfies DecodedSourceMap, map], () => null);
}

Expand Down
Loading