finds.dev← search

// the find

QwikDev/partytown

★ 13,707 · TypeScript · MIT · updated May 2026

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉

Partytown runs third-party scripts (analytics, tag managers, pixels) inside a web worker instead of the main thread by proxying synchronous DOM API calls back via SharedArrayBuffer or service workers. It's for teams who can't remove the tracking junk their marketing department demands but still want decent Core Web Vitals scores.

Clever synchronous bridge: most third-party scripts call synchronous DOM APIs that web workers don't have, and Partytown solves this by intercepting those calls and blocking the worker thread with Atomics.wait() while the main thread handles them — ugly but it works. Broad integration coverage: Next.js, Nuxt, SvelteKit, Astro, Gatsby, Angular, React all have documented setups. The proxy architecture means scripts don't need modification — you just change `type='text/javascript'` to `type='text/partytown'`. Real Playwright integration tests against actual vendor scripts (GTM, HubSpot, Intercom, Facebook Pixel) rather than mocks.

Still in beta after years — the README says 'not guaranteed to work in every scenario' and the trade-offs page exists because breakage is common enough to document. The synchronous proxy trick requires either SharedArrayBuffer (needs COOP/COEP headers, which breaks many existing setups) or a service worker fallback, and both add deployment complexity that teams frequently get wrong. Active development has slowed noticeably — most recent commits are docs and minor fixes, not feature work — so scripts that break today may stay broken. Third-party scripts that do heavy DOM reading in tight loops will serialize those reads back to the main thread and can actually perform *worse* than just loading normally.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →