fix(esbuild): sequence rebuild calls to prevent Windows EBUSY race on asset copy

This commit is contained in:
Elliott de Launay 2026-04-23 23:59:10 -04:00
parent fda3e985b1
commit ba5345c084
No known key found for this signature in database
GPG key ID: BB899BED766D1806

View file

@ -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()])
}
}