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
  • Loading branch information
alan-agius4 authored and josephperrott committed Jul 14, 2021
1 parent fe25ab1 commit 1be3b07
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,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 1be3b07

Please sign in to comment.