Skip to content

Commit 4c251ac

Browse files
committed
fix: watch ignored option for windows
closes #68
1 parent 9151c39 commit 4c251ac

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/features/watch.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ export async function watchBuild(
2424
const watcher = watch(files, {
2525
ignoreInitial: true,
2626
ignorePermissionErrors: true,
27-
ignored: (id) => {
28-
if (id.includes('/.git/') || id.includes('/node_modules/')) return true
29-
return id.startsWith(options.outDir)
30-
},
27+
ignored: [/[\\/]\.git[\\/]/, /[\\/]node_modules[\\/]/, options.outDir],
3128
})
3229

3330
watcher.on('all', (type: string, file: string) => {

0 commit comments

Comments
 (0)