Skip to content

Commit af9ed4c

Browse files
committed
fix: lazy import chokidar
1 parent 37bc7ee commit af9ed4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/cli/restart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'node:path';
2-
import chokidar from 'chokidar';
32
import { color, debounce, isTTY } from '../utils/helper';
43
import { logger } from '../utils/logger';
54

@@ -11,11 +10,12 @@ export async function watchFilesForRestart(
1110
return;
1211
}
1312

13+
const chokidar = await import('chokidar');
14+
1415
const watcher = chokidar.watch(files, {
1516
ignoreInitial: true,
1617
// If watching fails due to read permissions, the errors will be suppressed silently.
1718
ignorePermissionErrors: true,
18-
ignored: ['**/node_modules/**', '**/.git/**', '**/.DS_Store/**'],
1919
});
2020

2121
const callback = debounce(

0 commit comments

Comments
 (0)