Skip to content

Commit 4f8f737

Browse files
committed
refactor(@angular-devkit/build-angular): account for disabled mangling in downlevel cache
1 parent f1b87da commit 4f8f737

File tree

1 file changed

+5
-1
lines changed
  • packages/angular_devkit/build_angular/src/browser

1 file changed

+5
-1
lines changed

packages/angular_devkit/build_angular/src/browser/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import {
6363
normalizeOptimization,
6464
normalizeSourceMaps,
6565
} from '../utils';
66+
import { manglingDisabled } from '../utils/mangle-options';
6667
import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle';
6768
import { assertCompatibleAngularVersion } from '../utils/version';
6869
import {
@@ -374,7 +375,10 @@ export function buildWebpackBrowser(
374375
const codeHash = createHash('sha1')
375376
.update(action.code)
376377
.digest('hex');
377-
const baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
378+
let baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
379+
if (manglingDisabled) {
380+
baseCacheKey += '|MD';
381+
}
378382

379383
// Postfix added to sourcemap cache keys when vendor sourcemaps are present
380384
// Allows non-destructive caching of both variants

0 commit comments

Comments
 (0)