Configure awaitWriteFinish for chokidar (#5774)
* Configure `awaitWriteFinish` for chokidar * Enable `awaitWriteFinish` on Windows only
This commit is contained in:
parent
a7c89c8813
commit
f599430d56
2 changed files with 14 additions and 0 deletions
|
|
@ -700,6 +700,13 @@ async function build() {
|
|||
|
||||
watcher = chokidar.watch([...contextDependencies, ...extractFileGlobs(config)], {
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish:
|
||||
process.platform === 'win32'
|
||||
? {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10,
|
||||
}
|
||||
: false,
|
||||
})
|
||||
|
||||
let chain = Promise.resolve()
|
||||
|
|
|
|||
|
|
@ -84,6 +84,13 @@ function rebootWatcher(context, configPath, configDependencies, candidateFiles)
|
|||
|
||||
watcher = chokidar.watch([...candidateFiles, ...configDependencies], {
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish:
|
||||
process.platform === 'win32'
|
||||
? {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10,
|
||||
}
|
||||
: false,
|
||||
})
|
||||
|
||||
setWatcher(context, watcher)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue