Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): exclude outputPath from persist…
Browse files Browse the repository at this point in the history
…ent 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)
  • Loading branch information
alan-agius4 authored and josephperrott committed Jul 14, 2021
1 parent f3b2dc4 commit 5219c05
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,14 @@ function getCacheSettings(
.update(packageVersion)
.update(wco.projectRoot)
.update(JSON.stringify(wco.tsConfig))
.update(JSON.stringify(wco.buildOptions))
.update(
JSON.stringify({
...wco.buildOptions,
// Needed because outputPath changes on every build when using i18n extraction
// https://github.com/angular/angular-cli/blob/736a5f89deaca85f487b78aec9ff66d4118ceb6a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts#L264-L265
outputPath: undefined,
}),
)
.update(supportedBrowsers.join(''))
.digest('hex'),
};
Expand Down

0 comments on commit 5219c05

Please sign in to comment.