Skip to content

Commit

Permalink
fix: Ignore dotfiles in watcher
Browse files Browse the repository at this point in the history
Without this fix, when files in folders like `.git` and `.next` change, the reflection is ran again. The previous way of ignoring dotfiles didn't work properly.
  • Loading branch information
SpaceK33z committed Jul 6, 2020
1 parent 46082ca commit f9040ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/watcher/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function createWatcher(options: Options): Promise<Watcher> {
})

const watcher = Chok.watch([options.sourceRoot, ...pluginWatchContributions], {
ignored: ['./node_modules', './.*'],
ignored: ['./node_modules', /(^|[\/\\])\../],
ignoreInitial: true,
cwd: options.cwd, // prevent globbed files and required files from being watched twice,
})
Expand Down

0 comments on commit f9040ba

Please sign in to comment.