vite-plugin-pwa 2.0.0 widens its peer range
Published Updated
vite-plugin-pwa 2.0.0, released on 2026-10-03 as a major version, accepts @vite-pwa/assets-generator 2.x in its optional peer-dependency range. It also updates the README’s breaking-change note
(vite-plugin-pwa 2.0.0 release).
The package at the 2.0.0 tag declares Node 20.19.0 or later (package.json at vite-plugin-pwa 2.0.0).
The separately released assets generator 2.0.0 describes its breaking change as “Move to ESM only” (assets-generator 2.0.0 release).
Changes in the 2.0.0 release
Section titled “Changes in the 2.0.0 release”The release page calls 2.0.0 the next major release and groups its entries under enhancement and documentation headings, followed by chores. The enhancement is support for
@vite-pwa/assets-generator ^2.0.0 as a peer dependency. The documentation
entry updates the README’s breaking-change note to 2.0.0, and the chore entries
replace the publishing workflow and pin workflow actions. They also update the assets
generator used by the example
(vite-plugin-pwa 2.0.0 release).
The tagged package makes the dependency range exact. Its
peerDependencies object accepts @vite-pwa/assets-generator through
^1.0.0 || ^2.0.0. The same file places the package in
peerDependenciesMeta with optional: true. Version 2 is therefore accepted by
the plugin’s peer constraint, but the assets generator is not made a mandatory
peer installation by that metadata
(package.json at vite-plugin-pwa 2.0.0).
The peer range for Vite in that package remains a union from ^3.1.0 through
^8.0.0. The Workbox peer dependencies are workbox-build and
workbox-window, both at ^7.4.1
(package.json at vite-plugin-pwa 2.0.0).
The change behind the major version
Section titled “The change behind the major version”Pull request 946 changed two lines of package metadata and added a README note.
It changed the Node engine from >=16.0.0 to >=20.19.0, and changed the assets
generator peer range from ^1.0.0 to ^1.0.0 || ^2.0.0. It also documented the new
Node floor. The pull request was opened and merged on 2026-09-30
(vite-plugin-pwa pull request 946).
The author described the dependency issue in narrower terms: projects installing
both vite-plugin-pwa and the assets generator had been constrained to generator
^1.0.0 unless they supplied an npm override for 2.0.0. The proposed change added
2.0.0 to the legal peer dependencies. That statement concerns whether an explicit
2.x installation satisfies the peer range; it does not say that the plugin changes
a consuming project’s dependency declaration or lockfile
(vite-plugin-pwa pull request 946).
Pull request 953 supplied the documentation correction that appears on the release page. Its description says the publishing tool’s semantic pull-request handling made pull request 946 trigger a major release, and that the README note needed to name 2.0.0 rather than the minor version written in the earlier pull request. It was opened and merged on 2026-10-03 before the 2.0.0 release was published (vite-plugin-pwa pull request 953).
The README at the 2.0.0 tag now states that vite-plugin-pwa requires Node 20.19.0
or later from version 2.0.0. The tagged package records the same value in its
engines.node field and lists the assets generator separately as an optional peer
(vite-plugin-pwa README at 2.0.0,
package.json at vite-plugin-pwa 2.0.0).
The assets-generator boundary
Section titled “The assets-generator boundary”The assets-generator project published its own 2.0.0 release on 2026-09-12. Its release notes contain one breaking-change statement: “Move to ESM only.” They link that statement to pull request 70 (“feat!: move to ESM only”) and the corresponding commit, and provide a comparison from generator 1.0.4 to 2.0.0. The release notes do not prescribe a migration procedure for consumers (assets-generator 2.0.0 release).
The generator’s tagged package metadata declares version 2.0.0, sets type to
module, requires Node 20.19.0 or later, maps its root export to
./dist/index.mjs, and maps its types to dist/index.d.mts
(assets-generator package.json at 2.0.0).
The same export map points ./config, ./presets, ./api, and the documented
generator API subpaths to .mjs files. Its typesVersions entries point those
subpaths to .d.mts files, and the pwa-assets-generator binary points to
./bin/pwa-assets-generator.mjs. These are the module and type paths published in
the tagged package metadata
(assets-generator package.json at 2.0.0).
vite-plugin-pwa 2.0.0 does not replace 1.x support for the generator. The union in
its peer range retains ^1.0.0 and adds ^2.0.0. A project that declares a 1.x
generator therefore remains within the published peer range, while a project that
chooses a compatible 2.x declaration no longer needs the override described in
pull request 946 solely to satisfy this peer constraint
(package.json at vite-plugin-pwa 2.0.0,
pull request 946).
The plugin package lists the generator in peerDependenciesMeta with
optional: true and declares ^1.0.0 || ^2.0.0 in peerDependencies. The
generator’s own release lists “Move to ESM only” under breaking changes
(package.json at vite-plugin-pwa 2.0.0,
assets-generator 2.0.0 release).
Published package surfaces
Section titled “Published package surfaces”The plugin’s root export keeps separate module paths for import and require.
The import branch uses ./dist/index.js with ./dist/index.d.ts; the require
branch uses ./dist/index.cjs with ./dist/index.d.cts. The top-level module,
main, and types fields point to the corresponding files. The published
file list contains top-level declaration files along with dist and types
(package.json at vite-plugin-pwa 2.0.0).
The same export map publishes type-only subpaths for preact, react, solid,
svelte, vanillajs, and vue. It also names type declarations for client and
info, plus pwa-assets. It exposes the package metadata and retains a wildcard
subpath. These entries belong to vite-plugin-pwa itself and are separate from
the optional assets-generator peer
(package.json at vite-plugin-pwa 2.0.0).
The tagged README describes the plugin as framework-agnostic and lists built-in support for Vanilla JavaScript, Vue 3, React, Svelte, SolidJS, and Preact. It also names integrations with SvelteKit, VitePress, Astro, Nuxt 3, Remix, and other meta-frameworks (vite-plugin-pwa README at 2.0.0).
The README also describes sensible built-in defaults for common cases while exposing the plugin’s configuration for customization. It says the plugin is written in TypeScript and is fully tree-shakable. The README lists each of these statements in its feature summary (vite-plugin-pwa README at 2.0.0).
For PWA output, the README says the plugin can generate a service worker with offline support through Workbox and inject a web app manifest. It can configure static assets for offline support and automatically reload when new content is available. It separately describes development support for debugging custom service worker logic (vite-plugin-pwa README at 2.0.0).
The README presents the PWA Assets Generator as producing PWA assets from one command and one source image. It also describes an assets integration that can serve and generate PWA assets, then inject them in an application. Separately, the tagged package metadata lists the generator as an optional peer (vite-plugin-pwa README at 2.0.0, package.json at vite-plugin-pwa 2.0.0).
The usage section installs vite-plugin-pwa as a development dependency, then
imports VitePWA in a Vite configuration and adds VitePWA() to the plugins
array. For configuration details, the same README points readers to the project
documentation and its TypeScript declarations
(vite-plugin-pwa README at 2.0.0).
The generator package publishes configuration and preset entry points, including
minimal and minimal-2023. Its API subpaths cover instructions and HTML markup,
with additional paths for manifest icon entries and asset generation. Each JavaScript export points to an
.mjs file, while the matching type mapping points to .d.mts; its command-line
entry is pwa-assets-generator
(assets-generator package.json at 2.0.0).
The 2.0.0 README retains earlier installation boundaries next to the new Node requirement. It says version 0.17 requires Vite 5, version 0.16 requires Node 16 because Workbox 7 requires it, and version 0.13 requires Vite 3.1 or later. The new note says that version 2.0.0 requires Node 20.19.0 or later. Its configuration section links the plugin’s TypeScript declarations as the full configuration reference and separately links documentation for web app manifests and Workbox (vite-plugin-pwa README at 2.0.0).
The tagged plugin package marks itself sideEffects: false and publishes under
the MIT license. Its runtime dependency list names debug, pretty-bytes,
tinyglobby, workbox-build, and workbox-window; the two Workbox packages are
also present in the peer dependency list at ^7.4.1. The publish configuration
sets public access and enables provenance
(package.json at vite-plugin-pwa 2.0.0).
The commit linked by the generator release changes each root, configuration,
preset, and API export from paired import and require targets to a single
.mjs target. It removes the package’s main and module fields, and changes the
top-level type declaration from dist/index.d.ts to dist/index.d.mts. It also
raises engines.node from >=16.14.0 to >=20.19.0. The same commit replaces
the previous unbuild command with tsdown and adds a TypeScript type-check
script (assets-generator ESM commit).
Impact on generator and Node dependencies
Section titled “Impact on generator and Node dependencies”vite-plugin-pwa 2.0.0 declares node: ">=20.19.0" in engines. It accepts
assets-generator ^1.0.0 || ^2.0.0 as an optional peer. The
assets-generator 2.0.0 release separately records “Move to ESM only” as its
breaking change
(package.json at vite-plugin-pwa 2.0.0,
assets-generator 2.0.0 release).
The peer-range change resolves the condition named by pull request 946: an explicit installation of assets-generator 2.x can satisfy the plugin’s published peer constraint. The change does not select 2.x for a project. The consumer’s own dependency declaration and resolved installation remain outside the two-line peer range change shown in that pull request (vite-plugin-pwa pull request 946).
The tagged plugin metadata contains optional: true for the generator peer and
the range ^1.0.0 || ^2.0.0. The tagged generator metadata contains
type: "module" and its own node: ">=20.19.0" engine field
(package.json at vite-plugin-pwa 2.0.0,
assets-generator package.json at 2.0.0).
The tagged files also record different root export entries. The plugin maps an
import default to ./dist/index.js and a require default to
./dist/index.cjs; it publishes dist/index.d.ts and dist/index.d.cts for
those entries. The generator maps its root export to ./dist/index.mjs and its
types to dist/index.d.mts. Outside the plugin’s export map, main points to
dist/index.cjs and module points to dist/index.js. The types field points to
dist/index.d.ts. The generator’s files array names bin and dist
(package.json at vite-plugin-pwa 2.0.0,
assets-generator package.json at 2.0.0).
The release page identifies one enhancement and one documentation update, followed by three chores. The enhancement changes the accepted assets-generator peer range; the README update records the correct major-version note, while the remaining entries concern the publishing workflow and pinned actions, plus the example’s generator version (vite-plugin-pwa 2.0.0 release).
The plugin package records its Node engine and optional generator peer range in package metadata. The generator release records its ESM-only breaking change, but does not provide a migration procedure (package.json at vite-plugin-pwa 2.0.0, assets-generator 2.0.0 release).
Related entries
Section titled “Related entries”- Workbox: see Workbox reference.
- Debugging service workers: see how to inspect and update a service worker, or bypass it.
- Lighthouse: see Lighthouse reference.
Open and unverified
Section titled “Open and unverified”- The release notes do not enumerate a migration procedure for projects moving from assets-generator 1.x to 2.x.
- Whether any given project can adopt Node 20.19.0 or later is not established by the package release materials.
- How a specific package manager will resolve the optional peer without the consuming project’s manifest and lockfile is not confirmed.
- Whether a particular configuration loads assets-generator through CommonJS is not confirmed by these sources.
- Runtime behavior across every Vite and Workbox version admitted by the peer ranges is not documented as a compatibility matrix in the 2.0.0 release.
Sources
Section titled “Sources”- vite-plugin-pwa v2.0.0 (github.com)
- Pull request 946: allow assets-generator 2.0.0 as a peer dependency (github.com)
- Pull request 953: update the breaking-change note (github.com)
- vite-plugin-pwa package.json at v2.0.0 (github.com)
- vite-plugin-pwa README at v2.0.0 (github.com)
- assets-generator v2.0.0 (github.com)
- assets-generator ESM commit (github.com)
- assets-generator package.json at v2.0.0 (github.com)