Skip to content

Commit fa427fc

Browse files
author
Dimitar Tachev
authored
Merge pull request #95 from BenSjoberg/chokidar-false-matches
fix: disregard false matches from chokidar
2 parents 2d0bff5 + fbc6344 commit fa427fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/watcher.js

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ var watcherOptions = {
2121

2222
watcher = choki.watch('**/*.s[ac]ss', watcherOptions)
2323
.on('all', (event, filePath) => {
24+
// Workaround for false matches from chokidar
25+
if (!filePath.match(/\.s[ac]ss$/i)) {
26+
return;
27+
}
28+
2429
watchPromisesChain = watchPromisesChain
2530
.then(() => compiler.compile({appDir, projectDir}))
2631
.catch(err => {

0 commit comments

Comments
 (0)