QwikDev

partytown: Move Third-Party Scripts to Web Workers

Partytown is a lazy-loaded TypeScript library that moves resource-intensive third-party scripts off the browser’s main thread and into web workers. It aims to leave the main thread available for your site’s own code, but is not guaranteed to work in every scenario.

Stars
13.8k
Forks
460
Stars, last 30 days
+31
Last commit
1 day ago
Contributors
100+

Our take

Activeregular commits and releases

Health score

66/100

How it is scored
Activity
65
Community
71
Issues
51
Pull requests
77

+31 stars in the last 30 days

  • Merges more pull requests than 81% of the projects we track
  • More contributors than 78% of the projects we track
  • Slower to close issues than 89% of the projects we track

Partytown is an actively maintained, MIT-licensed option for experimenting with third-party scripts in web workers, with recent releases and contributions from a broad contributor base.

Good fit if

  • Your site has resource-intensive third-party scripts that are not on the critical path.
  • You can test the integrations you rely on against Partytown’s documented limitations.
  • You want a TypeScript library for web-worker-based script relocation and can use Node.js 18 or later for development.

Look elsewhere if

  • Your scripts must run on the main thread or depend on behavior that does not work through Partytown.
  • You need a solution guaranteed to work across every third-party script scenario.
All health signals
Last commit2026-10-29 (1 day ago)
Commits, last 90 days69
Releases, last 12 months12 (latest v1.0.3, 2026-10-29)
Contributors100+ (top contributor: 68% of commits)
Issues closed, last 90 days29+ (typically closed in 182 days)
Pull requests merged, last 90 days69 (typically merged in 0 days)
Project age5 years

Checked on 2026-10-31 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

13,836

Forks

460

Change since Nov 22, 2026: +1 stars·0 forks

Overview

Partytown is a lazy-loaded TypeScript library that uses web workers to run resource-intensive third-party scripts away from the browser’s main thread. Its goal is to reduce competition for main-thread resources so your site’s own code can stay responsive.

It is intended for web teams integrating scripts such as analytics that are not required for the critical rendering path. Partytown’s authors note that it does not work in every scenario, so check its compatibility guidance and trade-offs before relying on it.

Key Features

  • Relocates supported third-party scripts from the main thread to a web worker.
  • Loads lazily, rather than requiring the library to run as part of the initial page work.
  • Aims to reserve main-thread resources for your own site code.
  • Provides integration and configuration guidance for adapting it to a site.
  • Documents compatibility limitations and trade-offs in its FAQ and trade-off guide.

Use Cases

  • Web performance teams seeking to reduce competition between analytics scripts and interactive page code.
  • Site developers moving non-critical third-party scripts away from the main thread.
  • Teams investigating main-thread performance issues associated with external scripts.

What you need

Detected in the repository

  • Node.js >=18.0.0 (from package.json)
  • A test suite and automated checks on GitHub Actions

License in plain words

MITpermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Review the Getting Started guide for installation and setup. See the integration and configuration guides for site-specific details.

Considerations

The project explicitly warns that Partytown is not guaranteed to work in every scenario. Moving scripts to a web worker involves trade-offs, so assess the FAQ and trade-off guide, then test the third-party scripts your site depends on. The repository is active, with recent commits and releases and contributions from many contributors; its development requirements specify Node.js 18 or later.

Found this useful?

Share it with someone who would like partytown.