Skip to content

Commit 8cca739

Browse files
clydinvikerman
authored andcommitted
refactor(@angular-devkit/build-angular): account for disabled mangling in downlevel cache
1 parent e73a64f commit 8cca739

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
@@ -65,6 +65,7 @@ import {
6565
normalizeOptimization,
6666
normalizeSourceMaps,
6767
} from '../utils';
68+
import { manglingDisabled } from '../utils/mangle-options';
6869
import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle';
6970
import { assertCompatibleAngularVersion } from '../utils/version';
7071
import {
@@ -385,7 +386,10 @@ export function buildWebpackBrowser(
385386
const codeHash = createHash('sha1')
386387
.update(action.code)
387388
.digest('hex');
388-
const baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
389+
let baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
390+
if (manglingDisabled) {
391+
baseCacheKey += '|MD';
392+
}
389393

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

0 commit comments

Comments
 (0)