import chokidar from 'chokidar'; // One-liner for current directory chokidar.watch('.').on('all', (event, path) => { console.log(event, path); }); // Extended options // ---------------- // Initialize watcher. const watcher = chokidar.watch('file, dir, or array', { ignored: (path, stats) => stats?.isFile() && !path.endsWith('.js'), // only watch js files persistent: true, }); // Something to use w

