Skip to content

Commit 8df7a4f

Browse files
committed
refactor(@angular/build): use boundary resolution for sourcemap generation in oxc transform
Generating high-resolution sourcemap tokens for every character with hires: true produces substantially larger intermediate decoded mappings and increases peak memory consumption during sourcemap remapping. Using hires: 'boundary' generates tokens only at identifier and word boundaries. This significantly reduces decoded sourcemap memory footprint and remapping time while retaining full debugging accuracy.
1 parent 41dec41 commit 8df7a4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/angular/build/src/tools/oxc/oxc-transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ export function transform(filename: string, code: string, options: OxcTransformO
737737

738738
let map: DecodedSourceMap | undefined;
739739
if (options.sourcemap) {
740-
const rawMap = source.generateDecodedMap({ hires: true, source: filename });
740+
const rawMap = source.generateDecodedMap({ hires: 'boundary', source: filename });
741741
map = { ...rawMap, version: 3 };
742742
}
743743

0 commit comments

Comments
 (0)