Description
@vite-pwa/astro is an integration that adds Progressive Web App support to Astro sites with zero configuration. You add it to astro.config.mjs, and it uses sensible built-in defaults for common cases, while still letting you customize the plugin's behavior. It generates a service worker with offline support through Workbox and adds a web app manifest automatically. Stale-while-revalidate updates reload the page when new content is available, and built-in prompts for new content support vanilla JavaScript, Vue 3, React, Svelte, SolidJS and Preact. It can configure static assets for offline use, and it supports debugging your own service worker logic during development. A PWA assets generator creates all the PWA assets from one command and one source image, and an integration serves, generates and injects those assets in your application. The package is written in TypeScript. From v0.2.0 it requires Vite 5 and Astro 4.0.0 or above, and older versions need Vite 3.1.0 or later. It is MIT licensed.…
Highlights
- Zero-config PWA setup for Astro
- Offline support with a Workbox service worker
- Automatic web app manifest
- Update prompts for several frameworks
- PWA asset generator from one source image
Ratings & Reviews
No ratings yet
Be the first to rate Astro.
People also visit
Astro FAQ
What is @vite-pwa/astro?
An Astro integration that adds Progressive Web App support with zero configuration.
Does it work offline?
Yes. It generates a service worker with offline support through Workbox.
Which versions does it need?
From v0.2.0 it requires Vite 5 and Astro 4.0.0 or above. Older versions need Vite 3.1.0 or later.
How do I see the PWA working?
Stop the dev server, then run npm run build and npm run preview. The README links example projects for auto update and update prompts.
What license is it under?
MIT.
What are the best Astro alternatives?
Popular alternatives to Astro include Vite Plugin Pwa, Laravel PWA — ERAG and Laravel Pwa. See all Astro alternatives






