diff --git a/src/api/dev.ts b/src/api/dev.ts index 9b6797d..c4f2437 100644 --- a/src/api/dev.ts +++ b/src/api/dev.ts @@ -455,8 +455,9 @@ function noop() {} function watch_files(pattern: string, events: string[], callback: () => void) { let watcher; + let closed = false; - import('chokidar').then(({ default: chokidar }) => { + import('chokidar').then((chokidar) => { if (closed) return; watcher = chokidar.watch(pattern, {