diff --git a/lib/cli.js b/lib/cli.js index 01df7948..f76738ee 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -101,7 +101,7 @@ class PdfInvoker extends Invoker { ] }) console.log('Watch mode entered, needs to be manually terminated using Ctrl+C!') - chokidar.watch(watchFiles, { ignored: /(^|[/\\])\../ }).on('change', async (path) => { + chokidar.watch(watchFiles, { ignored: /(^|[/\\])\../, awaitWriteFinish: { stabilityThreshold: 1000, pollInterval: 100 } }).on('change', async (path) => { if (verbose) { console.log(` file changed ${path}`) }