Watch mode should wait for file change. (T7411)
This commit is contained in:
parent
8f790ceeed
commit
32232dd30e
@ -71,7 +71,11 @@ module.exports = function (commander, filenames) {
|
||||
_.each(filenames, function (dirname) {
|
||||
let watcher = chokidar.watch(dirname, {
|
||||
persistent: true,
|
||||
ignoreInitial: true
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10,
|
||||
}
|
||||
});
|
||||
|
||||
_.each(["add", "change"], function (type) {
|
||||
|
||||
@ -138,7 +138,11 @@ module.exports = function (commander, filenames, opts) {
|
||||
let 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