@vite-pwa/workbox-build
v8.0.5
Published
A module that integrates into your build process, helping you generate a manifest of local files that workbox-sw should precache.
Readme
🛠️ Welcome to Vite PWA Workbox Build
The modern toolkit for modern web apps. Vite PWA Workbox Build provides the essential, ESM-powered JavaScript libraries you need to build rock-solid, offline-ready Progressive Web Apps.
Requirements
@vite-pwa/workbox-build requires Node 22.14.0 or above.
You need to install the following dependencies to run @vite-pwa/workbox-build:
- Rolldown 1.0.0 or above: if you've installed Vite 8 or above, you don't need to install Rolldown as a dependency, because Vite 8 uses Rolldown; you need to install Rolldown when using Webpack, RsPack or RsBuild
magicstring0.5.0 or above: when usinggenerateSWstrategy only
Breaking Changes
The following breaking changes were introduced in the packages:
injectManifeststrategy doesn't build your service worker,@vite-pwa/workbox-buildjust injects the manifest into your service worker- removed service worker templates: consumer should use a custom service worker instead (using ESM notation)
- removed offline Google Analytics support
New features
@vite-pwa/workbox-build adds these new features:
buildSWstrategy: builds your service worker and injects the manifest into it when enabled- dual service worker generation, with
generateSWandbuildSWstrategies: useswTypeoption - dot
envfiles support:.env,.env.local,.env.[mode],.env.[mode].localfiles are supported - custom Rolldown/Vite plugins
- custom logs level configuration
- minify the service worker build, including comments (Rolldown options)
- custom code splitting chunks: now it is possible to split your service worker code into multiple chunks, not just
workboxservice worker modules - new
additionalManifestEntriesGeneratorfactory to allow use async generators to allow to defer the manifest entries generation (read and calculate revision) until required generateSWstrategy supports configuringparalleloption to allow precaching in parallel, instead of sequentiallygenerateSWstrategy supports configuringurlManipulationoption- build plugins for Vite, Webpack, RSPack and RSBuild
📄 License
MIT License © 2026-PRESENT Anthony Fu
