From 699802d48853cedbf9468b94d196fd8106d43485 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 7 Jun 2021 13:05:22 +0200 Subject: [PATCH] perf(@angular-devkit/build-angular): reduce memory usage by cleaning output directory before emitting Unless `deleteOutputPath` is false, we should clean, this helps reduce assets in tests. --- .../angular_devkit/build_angular/src/webpack/configs/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts index c3beb80e1774..4c9f83fad922 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts @@ -413,7 +413,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration { context: root, entry: entryPoints, output: { - clean: buildOptions.deleteOutputPath, + clean: buildOptions.deleteOutputPath ?? true, path: path.resolve(root, buildOptions.outputPath), publicPath: buildOptions.deployUrl ?? '', filename: ({ chunk }) => {