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
This commit is contained in:
Romeo Mihalovics 2023-05-24 10:07:02 +02:00 committed by Alan Agius
parent e2954d2cd7
commit 772fe84ed3

View File

@ -688,6 +688,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/**',
],
});