From 8152d39ad0002a06dcfdc39861c94c78d0b7d2bc Mon Sep 17 00:00:00 2001 From: Kim Shepherd Date: Tue, 3 Sep 2024 14:52:10 +0200 Subject: [PATCH] Ignore some paths from file watcher Watching all these directories can cause systems to exceed maximum watched files / inotify limits, especially in dev mode with IDEs etc also watching files. --- webpack/webpack.browser.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webpack/webpack.browser.ts b/webpack/webpack.browser.ts index 5a3b4910ae7..168185ef242 100644 --- a/webpack/webpack.browser.ts +++ b/webpack/webpack.browser.ts @@ -35,5 +35,12 @@ module.exports = Object.assign({}, commonExports, { buildAppConfig(join(process.cwd(), 'src/assets/config.json')); return middlewares; } - } + }, + watchOptions: { + // Ignore directories that should not be watched for recompiling angular + ignored: [ + '**/node_modules', '**/_build', '**/.git', '**/docker', + '**/.angular', '**/.idea', '**/.vscode', '**/.history', '**/.vsix' + ] + }, });