From d098e2116330c9f52760938f6cc36cc6b8104ee6 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 9 Jun 2020 09:22:13 +0200 Subject: [PATCH] fix(@ngtools/webpack): only process dependent packages with NGCC With this change we consume the change in https://github.com/angular/angular/pull/37075 where the NGCC now exposes a new option `--use-program-dependencies`, to only process packages which are part of the TypeScript program. From the initial benchmarking the time taken for NGCC to process that dependencies needed for an `ng new` application went down by 36% from 10526ms to 6708ms. --- packages/ngtools/webpack/src/ngcc_processor.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ngtools/webpack/src/ngcc_processor.ts b/packages/ngtools/webpack/src/ngcc_processor.ts index 93abb697eeb1..168c27aa74b8 100644 --- a/packages/ngtools/webpack/src/ngcc_processor.ts +++ b/packages/ngtools/webpack/src/ngcc_processor.ts @@ -85,6 +85,7 @@ export class NgccProcessor { '--async', '--tsconfig', /** tsConfigPath */ this.tsConfigPath, + '--use-program-dependencies', ], { stdio: ['inherit', process.stderr, process.stderr],