Skip to content

Commit 7b4a5c3

Browse files
authored
build: fix watch does not work (#2785)
1 parent 94fa207 commit 7b4a5c3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/build.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,12 @@ const common = {
215215

216216
async function invokeBuild(options) {
217217
const ctx = await esbuild.context(options);
218-
if (watch) await ctx.watch();
219-
else await ctx.rebuild();
220-
ctx.dispose();
218+
if (watch) {
219+
await ctx.watch();
220+
} else {
221+
await ctx.rebuild();
222+
ctx.dispose();
223+
}
221224
}
222225

223226
const srcBuild = invokeBuild({

0 commit comments

Comments
 (0)