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.
This commit is contained in:
Alan Agius 2021-06-07 13:05:22 +02:00
parent b35ce89de5
commit 699802d488

View File

@ -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 }) => {