Skip to content

Commit fa0fc45

Browse files
clydinjosephperrott
authored andcommitted
perf(@angular-devkit/build-angular): use Webpack's GC memory caching in watch mode
The GC caching mode will remove any unused cache entries after each rebuild. This prevents old modules from being retained indefinitely during long-lived development sessions. (cherry picked from commit ef6996a)
1 parent ec61711 commit fa0fc45

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,10 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
483483
...extraRules,
484484
],
485485
},
486-
cache: !!buildOptions.watch && !cachingDisabled,
486+
cache: !!buildOptions.watch && !cachingDisabled && {
487+
type: 'memory',
488+
maxGenerations: 1,
489+
},
487490
optimization: {
488491
minimizer: extraMinimizers,
489492
moduleIds: 'deterministic',

0 commit comments

Comments
 (0)