diff --git a/scripts/build.js b/scripts/build.js index 0bc68ca1d2..ecf0a0f0b3 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -215,9 +215,12 @@ const common = { async function invokeBuild(options) { const ctx = await esbuild.context(options); - if (watch) await ctx.watch(); - else await ctx.rebuild(); - ctx.dispose(); + if (watch) { + await ctx.watch(); + } else { + await ctx.rebuild(); + ctx.dispose(); + } } const srcBuild = invokeBuild({