Skip to content

Commit 9abf44d

Browse files
terencehonlesclydin
authored andcommitted
fix(@angular-devkit/build-angular): ensure NG_PERSISTENT_BUILD_CACHE always creates a cache in the specified cache directory
This change fixes `NG_PERSISTENT_BUILD_CACHE` sometimes creating cache entries that live outside of the cache directory by using a hex encoding rather than a base64 encoding. This error is caused because the base64 alphabet includes `/`. According to the webpack documentation [1] the default `cacheLocation` is: path.resolve(cache.cacheDirectory, cache.name) Which means cache names with a leading `/` would remove the `cacheDirectory` altogether. [1]: https://webpack.js.org/configuration/other-options/#cachecachelocation
1 parent 736a5f8 commit 9abf44d

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ function getCacheSettings(
532532
.update(JSON.stringify(wco.tsConfig))
533533
.update(JSON.stringify(wco.buildOptions))
534534
.update(supportedBrowsers.join(''))
535-
.digest('base64'),
535+
.digest('hex'),
536536
};
537537
}
538538

0 commit comments

Comments
 (0)