From ba5345c084bb31e315a4cf71e159d6cec8a38435 Mon Sep 17 00:00:00 2001 From: Elliott de Launay Date: Thu, 23 Apr 2026 23:59:10 -0400 Subject: [PATCH] fix(esbuild): sequence rebuild calls to prevent Windows EBUSY race on asset copy --- src/esbuild.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/esbuild.mjs b/src/esbuild.mjs index aabacfcee9..4584ad1ad0 100644 --- a/src/esbuild.mjs +++ b/src/esbuild.mjs @@ -125,7 +125,10 @@ async function main() { copyLocales(srcDir, distDir) setupLocaleWatcher(srcDir, distDir) } else { - await Promise.all([extensionCtx.rebuild(), workerCtx.rebuild()]) + // Run sequentially on rebuild to avoid Windows EBUSY races when both + // onEnd hooks copy the same asset directories concurrently. + await extensionCtx.rebuild() + await workerCtx.rebuild() await Promise.all([extensionCtx.dispose(), workerCtx.dispose()]) } }