From b25775fb4e4184166768fb76d27778e25fe1a10b Mon Sep 17 00:00:00 2001 From: Alexander von Weiss Date: Fri, 16 Feb 2024 15:42:02 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): avoid build performance hit when using custom loader loaders in esbuild aren't really custom code. You can only choose from the loaders that esbuild provides. So I doubt they require this `externalPackagesPlugin` which comes at a pretty steep cost of 1 second per 1500 imports your project has on every build and watch rebuild. fixes https://github.com/angular/angular-cli/issues/27116 --- .../build_angular/src/tools/esbuild/application-code-bundle.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/tools/esbuild/application-code-bundle.ts b/packages/angular_devkit/build_angular/src/tools/esbuild/application-code-bundle.ts index 57c01b3f0db5..d713b6812c7d 100644 --- a/packages/angular_devkit/build_angular/src/tools/esbuild/application-code-bundle.ts +++ b/packages/angular_devkit/build_angular/src/tools/esbuild/application-code-bundle.ts @@ -65,9 +65,8 @@ export function createBrowserCodeBundleOptions( } if (options.externalPackages) { - // Package files affected by a customized loader should not be implicitly marked as external + // Package files affected by a customized plugin should not be implicitly marked as external if ( - options.loaderExtensions || options.plugins || typeof options.externalPackages === 'object' ) {