mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
fix file watching
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user