build: add workbox-window as explicit devDependency #62

Merged
padreug merged 1 commit from feat/add-workbox-window-dep into dev 2026-05-23 09:12:01 +00:00
Owner

Summary

Add workbox-window: ^7.3.0 to devDependencies.

Why

Under pnpm's strict hoisting (introduced in #61), Rollup can't resolve import 'workbox-window' from vite-plugin-pwa's virtual:pwa-register module, because workbox-window only lives in node_modules/.pnpm/vite-plugin-pwa@*/node_modules/ — not at the top level where Rollup looks. npm's flat hoisting masked this previously.

Discovered while deploying aio-demo from server-deploy (NixOS fetchPnpmDeps + pnpmConfigHook). Build failed at the Rollup stage on every standalone (restaurant-app, chat-app, ...) with:

[vite]: Rollup failed to resolve import "workbox-window" from "/@vite-plugin-pwa/virtual:pwa-register"

Standard upstream fix per vite-plugin-pwa pnpm guidance.

Test plan

  • pnpm install resolves workbox-window@7.4.1 (already present as a transitive — explicit pin just hoists it)
  • pnpm run dev:all still boots all 9 vite servers
  • aio-demo deploy via server-deploy succeeds end-to-end (will verify after merge + nix flake update webapp-demo)
## Summary Add `workbox-window: ^7.3.0` to `devDependencies`. ## Why Under pnpm's strict hoisting (introduced in #61), Rollup can't resolve `import 'workbox-window'` from `vite-plugin-pwa`'s `virtual:pwa-register` module, because `workbox-window` only lives in `node_modules/.pnpm/vite-plugin-pwa@*/node_modules/` — not at the top level where Rollup looks. npm's flat hoisting masked this previously. Discovered while deploying `aio-demo` from `server-deploy` (NixOS `fetchPnpmDeps` + `pnpmConfigHook`). Build failed at the Rollup stage on every standalone (`restaurant-app`, `chat-app`, ...) with: ``` [vite]: Rollup failed to resolve import "workbox-window" from "/@vite-plugin-pwa/virtual:pwa-register" ``` Standard upstream fix per `vite-plugin-pwa` pnpm guidance. ## Test plan - [x] `pnpm install` resolves `workbox-window@7.4.1` (already present as a transitive — explicit pin just hoists it) - [x] `pnpm run dev:all` still boots all 9 vite servers - [ ] aio-demo deploy via `server-deploy` succeeds end-to-end (will verify after merge + `nix flake update webapp-demo`)
Required for pnpm strict-hoisting builds (used by aiolabs/server-deploy
NixOS builds). Without it as a direct dep, Rollup can't resolve
`workbox-window` from vite-plugin-pwa's virtual:pwa-register module —
npm's flat hoisting masked this previously.
padreug deleted branch feat/add-workbox-window-dep 2026-05-23 09:12:01 +00:00
Sign in to join this conversation.
No description provided.