We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70cfb7d commit 1cda8faCopy full SHA for 1cda8fa
lib/monitor/watch.js
@@ -7,6 +7,7 @@ var chokidar = require('chokidar');
7
var undefsafe = require('undefsafe');
8
var config = require('../config');
9
var path = require('path');
10
+const fs = require('fs');
11
var utils = require('../utils');
12
var bus = utils.bus;
13
var match = require('./match');
@@ -48,6 +49,12 @@ function watch() {
48
49
ignored.push(dotFilePattern);
50
}
51
52
+ // if the directory is a file, it somehow causes
53
+ // windows to lose the filename upon change
54
+ if (fs.statSync(dir).isFile()) {
55
+ dir = path.dirname(dir);
56
+ }
57
+
58
var watchOptions = {
59
ignorePermissionErrors: true,
60
cwd: dir,
0 commit comments