After setting up, then closing, a watcher, the Node process doesn't exit.
Windows.
const chokidar = require('chokidar')
const options = {}
const directoryPath = srcPath
// configuration taken from webpack
const watcher = chokidar.watch(directoryPath, {
ignoreInitial: true,
persistent: true,
followSymlinks: false,
depth: 0,
atomic: false,
alwaysStat: true,
ignorePermissionErrors: true,
usePolling: options.poll ? true : undefined,
interval: typeof options.poll === "number" ? options.poll : undefined
});
watcher.close()
After setting up, then closing, a watcher, the Node process doesn't exit.
Windows.