Skip to content

Commit e70ba50

Browse files
committed
fix watch build
1 parent 188ac21 commit e70ba50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

watch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ class SingleTaskPool {
2323
}
2424
}
2525

26-
export async function watchBuild(build: () => Promise<any>, paths: string[]) {
26+
export function watchBuild(build: () => Promise<any>, paths: string[]) {
2727
const wrapper = new SingleTaskPool(build);
2828
wrapper.run();
29-
for (const path of paths) {
30-
watch(path, { recursive: true }, () => wrapper.run());
31-
}
29+
return paths.map((path) =>
30+
watch(path, { recursive: true }, () => wrapper.run())
31+
);
3232
}

0 commit comments

Comments
 (0)