Skip to content

Commit

Permalink
fix: pnpm workspace watch too many files (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 authored Nov 13, 2024
1 parent 6d27aa9 commit e8b9a68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/mako/src/dev/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ impl<'a> Watcher<'a> {
}

fn watch_file_or_dir(&mut self, path: PathBuf, ignore_list: &[PathBuf]) -> anyhow::Result<()> {
if Self::should_ignore_watch(&path, ignore_list) {
if Self::should_ignore_watch(&path, ignore_list)
|| path.to_string_lossy().contains("node_modules")
{
return Ok(());
}

if path.is_file() && !self.watched_files.contains(&path) {
self.watcher
.watch(path.as_path(), notify::RecursiveMode::NonRecursive)?;
Expand Down

0 comments on commit e8b9a68

Please sign in to comment.