Skip to content

Commit

Permalink
fix(core): filter batches of outputs changes properly
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Jun 20, 2023
1 parent 30c57fd commit 47e4d8e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/nx/src/daemon/server/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,15 @@ export async function watchOutputFiles(cb: FileWatcherCallback) {
return cb(err, null);
}

for (const event of events) {
if (
event.path.startsWith('.git') ||
event.path.includes('node_modules')
) {
return;
}
events = events.filter((event) => {
return (
!event.path.startsWith('.git') && !event.path.includes('node_modules')
);
});

if (events.length !== 0) {
cb(null, events);
}

cb(null, events);
});
return watcher;
}
Expand Down

0 comments on commit 47e4d8e

Please sign in to comment.