Skip to content

Commit 342c3f8

Browse files
committed
feat: filter node_modules when watching files
1 parent 8a69558 commit 342c3f8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dist/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25038,7 +25038,9 @@ async function cli() {
2503825038
dir: path.join(process.cwd()),
2503925039
debounce: 40,
2504025040
filter: ({ path }) => {
25041+
if (/.*\/node_modules\/.*/.test(path)) return false;
2504125042
console.log(path);
25043+
2504225044
return path.startsWith(pkg) || path.startsWith(docs);
2504325045
},
2504425046
});

src/cli.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export default async function cli() {
3737
dir: path.join(process.cwd()),
3838
debounce: 40,
3939
filter: ({ path }: { path: string }) => {
40+
if (/.*\/node_modules\/.*/.test(path)) return false;
4041
console.log(path);
42+
4143
return path.startsWith(pkg) || path.startsWith(docs);
4244
},
4345
});

0 commit comments

Comments
 (0)