Merge pull request #3698 from hayeah/master
Watch mode should wait for file write. (T7411)
This commit is contained in:
commit
40746f3dcb
@ -69,7 +69,11 @@ module.exports = function (commander, filenames) {
|
||||
filenames.forEach(function (dirname) {
|
||||
const watcher = chokidar.watch(dirname, {
|
||||
persistent: true,
|
||||
ignoreInitial: true
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10,
|
||||
}
|
||||
});
|
||||
|
||||
["add", "change"].forEach(function (type) {
|
||||
|
||||
@ -151,7 +151,11 @@ module.exports = function (commander, filenames, opts) {
|
||||
const chokidar = util.requireChokidar();
|
||||
chokidar.watch(filenames, {
|
||||
persistent: true,
|
||||
ignoreInitial: true
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10,
|
||||
}
|
||||
}).on("all", function (type, filename) {
|
||||
if (util.shouldIgnore(filename) || !util.canCompile(filename, commander.extensions)) return;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user