Skip to content

Commit 4b3d4e9

Browse files
Use the alwaysStat option of chokidar to ensure stats is passed
Set the `alwaysStat` option of chokidar to ensure the `stats` object is passed to the change option even if it wasn't available beforehand. https://www.npmjs.com/package/chokidar#performance
1 parent 4014679 commit 4b3d4e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/FilesWatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FilesWatcher.prototype.watch = function () {
2222
this.watchers = this.watchPaths.map(function (watchPath) {
2323
return chokidar.watch(
2424
watchPath,
25-
{ persistent: true }
25+
{ persistent: true, alwaysStat: true }
2626
)
2727
.on('change', function (filePath, stats) {
2828
if (this.isFileSupported(filePath)) {

0 commit comments

Comments
 (0)