Skip to content

Commit 39aa627

Browse files
alan-agius4vikerman
authored andcommitted
fix(@angular-devkit/build-angular): account for hashed and non hashed filesnames when having sourcemaps
1 parent 5bd2e6b commit 39aa627

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/angular_devkit/build_angular/src/browser/action-cache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export class BundleActionCache {
7676

7777
// sourceMappingURL is added at the very end which causes the code to be the same when sourcemaps are enabled/disabled
7878
// When using hiddenSourceMaps we can omit the postfix since sourceMappingURL will not be added.
79-
const sourceMapPostFix = action.sourceMaps && !action.hiddenSourceMaps ? '|sourcemap' : '';
79+
// When having sourcemaps a hashed file and non hashed file can have the same content. But the sourceMappingURL will differ.
80+
const sourceMapPostFix = action.sourceMaps && !action.hiddenSourceMaps ? `|sourcemap|${action.filename}` : '';
8081

8182
const baseCacheKey = this.generateBaseCacheKey(action.code);
8283

0 commit comments

Comments
 (0)