From 9817b984b15e352caedac6e347cc662117b9e0f8 Mon Sep 17 00:00:00 2001 From: Romeo Mihalovics Date: Wed, 24 May 2023 10:07:02 +0200 Subject: [PATCH] fix(@angular-devkit/build-angular): ignore .git folder in browser-esbuild watcher When running the builder in watch mode, and fetching the git repo that the project is contained in, any changes in the .git folder trigger a rebuild. This is especially annoying when the IDE that you use periodically fetches the repository, and the FETCH_HEAD file triggers the rebuild every time. With this change the .git folder will be ignored in the watcher (cherry picked from commit 772fe84ed399ccc085893e645163b4b12c461d0e) --- .../build_angular/src/builders/browser-esbuild/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts index c0ec8e921791..63ee2f5bc4ff 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts +++ b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts @@ -645,6 +645,7 @@ export async function* buildEsbuildBrowserInternal( // Ignore all node modules directories to avoid excessive file watchers. // Package changes are handled below by watching manifest and lock files. '**/node_modules/**', + '**/.git/**', ], });