Skip to content

Commit 5219c05

Browse files
alan-agius4josephperrott
authored andcommitted
fix(@angular-devkit/build-angular): exclude outputPath from persistent build cache key
With this change we exclude `outputPath` from cache key due to i18n extraction which causes it to change on every build https://github.com/angular/angular-cli/blob/736a5f89deaca85f487b78aec9ff66d4118ceb6a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts#L264-L265 Closes #21275 (cherry picked from commit 1be3b07)
1 parent f3b2dc4 commit 5219c05

File tree

1 file changed

+8
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+8
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/common.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,14 @@ function getCacheSettings(
545545
.update(packageVersion)
546546
.update(wco.projectRoot)
547547
.update(JSON.stringify(wco.tsConfig))
548-
.update(JSON.stringify(wco.buildOptions))
548+
.update(
549+
JSON.stringify({
550+
...wco.buildOptions,
551+
// Needed because outputPath changes on every build when using i18n extraction
552+
// https://github.com/angular/angular-cli/blob/736a5f89deaca85f487b78aec9ff66d4118ceb6a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts#L264-L265
553+
outputPath: undefined,
554+
}),
555+
)
549556
.update(supportedBrowsers.join(''))
550557
.digest('hex'),
551558
};

0 commit comments

Comments
 (0)