Description
Serwist is a toolkit for building service workers, the background scripts that let a web app cache files and work offline. Its packages cover the core library, a build tool, a browser window helper, and plugins for Next.js, Nuxt, Vite and webpack. A basic setup is short. You write a service worker file that passes the precache manifest and options to a Serwist instance, then call addEventListeners. The precache manifest is injected at build time by a build tool or framework plugin, so you do not maintain the list of URLs to cache by hand. The options control how the precache behaves. They can remove outdated caches, set how many requests run at once, ignore URL parameters when matching, and decide whether a new service worker skips waiting and claims open pages. The Vite example uses a default runtime caching setup from the Vite worker entry, and the example shows a typed global for the manifest. The site says its API works alongside the browser's Service Worker API. The docs include a guide to configuring the build, and the source is on GitHub under the serwist organization. Install the core and build packages with npm install -D serwist @serwist/build.…
Highlights
- Precache manifest injected at build time
- Packages for Next.js, Nuxt, Vite and webpack
- Configurable precache cleanup and concurrency
- Runtime caching defaults for Vite
- Install with npm
Ratings & Reviews
No ratings yet
Be the first to rate Serwist.
People also visit

pwa-development
Progressive Web Apps - service workers, caching strategies, offline, Workbox
Serwist FAQ
What is Serwist?
A toolkit for building service workers that cache files and let web apps work offline.
Which frameworks are supported?
The site lists plugins for Next.js, Nuxt, Vite and webpack, plus the core and build packages.
Do I write the list of cached URLs myself?
No. A build tool or framework plugin injects the precache manifest at build time.
How do I install it?
Run npm install -D serwist @serwist/build, then follow the configuration guide in the docs.
Where is the source?
On GitHub under the serwist organization, at github.com/serwist/serwist.
What are the best Serwist alternatives?
Popular alternatives to Serwist include Basic Service Worker, Vite Plugin Pwa and Astro. See all Serwist alternatives








