Harden scanner startup and defer polyfill loading

- Fix waitForVideoReady race by re-checking after listeners and timing out
- Serialize iOS native scans with an in-flight guard and chained timeouts
- Lazy-load @undecaf/barcode-detector-polyfill only when scanning starts

Co-authored-by: Ned Halksworth <hello@nedhalksworth.com>
This commit is contained in:
Cursor Agent
2026-05-27 22:01:48 +00:00
parent 64584315e5
commit aa1bf1b21f
3 changed files with 76 additions and 24 deletions
-1
View File
@@ -13,7 +13,6 @@ export default defineConfig(({ command }) => ({
charts: ["recharts"],
motion: ["framer-motion"],
icons: ["lucide-react"],
barcode: ["@undecaf/barcode-detector-polyfill"],
},
},
},