build: ENG-06 support TS entries and preserve AMD globals

This commit is contained in:
Harvey Zhao committed 2026-09-10 21:47:10 +08:00
1 parent 771482426f
commit b53461da1c
23 files changed
+1046 -65

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
export function createRebuildQueue(build) {
let pending = false
let active
return () => {
pending = true
if (!active) {
active = Promise.resolve().then(async () => {
while (pending) {
pending = false
await build()
}
}).finally(() => { active = undefined })
}
return active
}
}