From 1ab6091aa5a9ffe639a1c1e31805e9621851e2bd Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 31 Dec 2019 13:53:52 -0500 Subject: [PATCH] fix(@angular-devkit/build-angular): prevent differential loading double sourcemap search This can drastically reduce memory usage; especially in cases where bundled code modules contain individual sourcemap comments and vendor sourcemaps are disabled. Enabling the vendor sourcemap option has the side effect of removing all individual module sourcemap comments and as a result removes the potential for those comments to be found and processed. --- .../angular_devkit/build_angular/src/utils/process-bundle.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 730226ad83b7..2fe4b34ade59 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -97,7 +97,7 @@ export async function process(options: ProcessBundleOptions): Promise= 1024 * 1024 || mapSize >= 1024 * 1024; const sourceCode = options.code; - const sourceMap = options.map ? JSON.parse(options.map) : undefined; + const sourceMap = options.map ? JSON.parse(options.map) : false; let downlevelCode; let downlevelMap; @@ -105,7 +105,8 @@ export async function process(options: ProcessBundleOptions): Promise