Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): account for disabled manglin…
Browse files Browse the repository at this point in the history
…g in downlevel cache
  • Loading branch information
clydin authored and vikerman committed Sep 27, 2019
1 parent e73a64f commit 8cca739
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/angular_devkit/build_angular/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import {
normalizeOptimization,
normalizeSourceMaps,
} from '../utils';
import { manglingDisabled } from '../utils/mangle-options';
import { CacheKey, ProcessBundleOptions } from '../utils/process-bundle';
import { assertCompatibleAngularVersion } from '../utils/version';
import {
Expand Down Expand Up @@ -385,7 +386,10 @@ export function buildWebpackBrowser(
const codeHash = createHash('sha1')
.update(action.code)
.digest('hex');
const baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
let baseCacheKey = `${packageVersion}|${action.code.length}|${codeHash}`;
if (manglingDisabled) {
baseCacheKey += '|MD';
}

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

0 comments on commit 8cca739

Please sign in to comment.