Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): use manual sourcemap processing f…
Browse files Browse the repository at this point in the history
…or large sourcemaps

Mitigates #15493
  • Loading branch information
clydin authored and vikerman committed Sep 19, 2019
1 parent 4d1944c commit 8595ec8
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -56,7 +56,8 @@ async function processWorker(options: ProcessBundleOptions): Promise<void> {
// if code size is larger than 500kB, manually handle sourcemaps with newer source-map package.
// babel currently uses an older version that still supports sync calls
const codeSize = Buffer.byteLength(options.code, 'utf8');
const manualSourceMaps = codeSize >= 500 * 1024;
const mapSize = options.map ? Buffer.byteLength(options.map, 'utf8') : 0;
const manualSourceMaps = codeSize >= 500 * 1024 || mapSize >= 500 * 1024;

// downlevel the bundle
let { code, map } = await transformAsync(options.code, {
Expand Down

0 comments on commit 8595ec8

Please sign in to comment.