Skip to content

Commit

Permalink
perf(@angular-devkit/build-angular): use Webpack's GC memory caching …
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
clydin authored and josephperrott committed Apr 21, 2021
1 parent ec61711 commit fa0fc45
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,10 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
...extraRules,
],
},
cache: !!buildOptions.watch && !cachingDisabled,
cache: !!buildOptions.watch && !cachingDisabled && {
type: 'memory',
maxGenerations: 1,
},
optimization: {
minimizer: extraMinimizers,
moduleIds: 'deterministic',
Expand Down

0 comments on commit fa0fc45

Please sign in to comment.