@unplugin-pwa/vite weekly downloads statistics
By unplugin-pwa · npm · Vite plugins
Zero-config PWA for Vite
@unplugin-pwa/vite has 94,213 recorded weekly downloads on npm, an increase of 2251% over the past 30 days, ranking #649 of 3,247 tracked listings.
About @unplugin-pwa/vite
🔌 What is @unplugin-pwa/vite?
The Vite integration of unplugin-pwa. It ships two things:
- Ready-to-use Vite plugins: the main plugin for Vite 8+, and a legacy plugin for earlier versions.
- Building blocks for Vite-based tooling: a set of utilities, equivalent to
@unplugin-pwa/corebut specific to Vite, that you can use to create your own integration.
The plugin itself is built on top of these utilities, and so are the integrations for meta-frameworks (VitePress, Astro, SvelteKit, Nuxt, React Router and TanStack Start). They don't wrap the Vite plugin: they compose the exported pieces directly, so each one can adapt PWA support to its own build pipeline.
🧩 Which one do I use?
🔄 Replaces
vite-plugin-pwa.@unplugin-pwa/viteis the successor ofvite-plugin-pwa. Upgrading requires a few changes, see the breaking changes guide.
| You are… | Use |
|---|---|
| Building a plain Vite app | The Vite plugin: import { VitePWA } from '@unplugin-pwa/vite' |
| Using Vite < 6 | The legacy plugin: import { ViteLegacyPWA } from '@unplugin-pwa/vite/legacy' |
| Using a supported meta-framework | Its dedicated integration (it depends on this package) |
| Creating your own integration | The exported utilities |
📋 Requirements
@unplugin-pwa/vite requires Node 22.14.0 or above.
You need to install the following dependencies:
- Rolldown 1.0.0 or above: if your Vite version is 8 or above, you don't need to install Rolldown as a dependency, because Vite 8+ uses Rolldown
magicast0.5.0 or above: when usinggenerateSWstrategy only
📦 Install
npm i @unplugin-pwa/vite -D
# yarn
yarn add @unplugin-pwa/vite -D
# pnpm
pnpm add @unplugin-pwa/vite -D
🐐 Strict Dependency Isolation (Monorepos & Custom setups)
If you are using a package manager with strict dependency isolation (e.g., pnpm with hoist=false or Yarn PnP), you might encounter [UNRESOLVED_IMPORT] errors during the build process.
Because strict isolation prevents transitive dependencies from being accessible from the root of your project, the underlying bundler (Vite/Rolldown) may not be able to resolve the internal packages required to build the Service Worker.
To resolve this, you must explicitly declare the dependency in the application package that runs the build:
- Add
@vite-pwa/workbox-swkitforgenerateSW, or forbuildSWwhen the service worker imports its modules.
# Using pnpm
pnpm add -D @vite-pwa/workbox-swkit
# Using yarn
yarn add -D @vite-pwa/workbox-swkit
🦄 Usage
Add VitePWA plugin to vite.config.js / vite.config.ts and configure it:
// vite.config.js / vite.config.ts
import { VitePWA } from '@unplugin-pwa/vite'
export default {
plugins: [
VitePWA()
]
}
Read the 📖 documentation for a complete guide on how to configure and use this plugin.
👀 Full config
Check out the following links for further details:
📄 License
MIT License © 2026-PRESENT Anthony Fu
Description from the npm listing.
- react
- pwa
- vue
- preact
- svelte
- workbox
- solidjs
- vite
- vite-plugin
- vite plugins
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (135)Similar npm Vite plugins plugins
All 20 @unplugin-pwa/vite alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@unplugin-pwa/vite. First seen Nov 15, 2026; last successful collection Dec 6, 2026. See the methodology.