Skip to content

Commit a5c6972

Browse files
alan-agius4clydin
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 0776370 commit a5c6972

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ function getCacheSettings(
494494
.update(JSON.stringify(wco.tsConfig))
495495
.update(JSON.stringify(wco.buildOptions))
496496
.update(supportedBrowsers.join(''))
497-
.digest('base64'),
497+
.digest('hex'),
498498
};
499499
}
500500

0 commit comments

Comments
 (0)