Skip to content

Commit d39a588

Browse files
authored
fix: hmr handler crash on dir unlink
1 parent 95c8a6a commit d39a588

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/commandkit/src/cli/development.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ export async function bootstrapDevelopmentServer(configPath?: string) {
125125
watcher.on('change', hmrHandler);
126126
watcher.on('add', hmrHandler);
127127
watcher.on('unlink', hmrHandler);
128-
watcher.on('unlinkDir', (path) => {
129-
const hasChild = readdirSync(path).length > 0;
130-
if (hasChild) return hmrHandler(path);
131-
});
128+
watcher.on('unlinkDir', hmrHandler);
132129
watcher.on('error', (e) => {
133130
console.error(e);
134131
});

0 commit comments

Comments
 (0)