Which project does this relate to?
Start
Describe the bug
vite-plugin-pwa's build steps (generate assets, generate serviceworker bundle) are seemingly not executed when running vite build with VitePWA() and tanstackStart() both present.
This is likely because to vite-plugin-pwa not having proper support for the Vite 6 environment API.
There is an open PR to solve this: vite-pwa/vite-plugin-pwa#786, however the current state of this PR has the same issue as the stable version of the package.
No PWA/SW steps are ran in build:
but it works in the vite dev server:
Your Example Website or App
https://stackblitz.com/edit/github-djpcrmc9?file=src%2Frouter.tsx
Steps to Reproduce the Bug or Issue
npm install
npm run build
- No PWA/SW steps are ran in build:
Expected behavior
- Build steps actually run during
vite build
- Service worker gets built into tanstack start's
client-dist, so it can also get picked up by nitro publicAssets[]
- Any script injection steps such as into also work(?)
Screenshots or Videos
No response
Platform
- Start Version: ^1.131.7
- OS: macOS, Stackblitz WebContainer
- Browser: Chrome
- Browser Version: 139.0.7258.66
- Bundler: Vite
- Bundler Version: ^6.3.5
Additional context
No response
Which project does this relate to?
Start
Describe the bug
vite-plugin-pwa's build steps (generate assets, generate serviceworker bundle) are seemingly not executed when running
vite buildwith VitePWA() andtanstackStart()both present.This is likely because to vite-plugin-pwa not having proper support for the Vite 6 environment API.
There is an open PR to solve this: vite-pwa/vite-plugin-pwa#786, however the current state of this PR has the same issue as the stable version of the package.
No PWA/SW steps are ran in build:
but it works in the vite dev server:
Your Example Website or App
https://stackblitz.com/edit/github-djpcrmc9?file=src%2Frouter.tsx
Steps to Reproduce the Bug or Issue
npm installnpm run buildExpected behavior
vite buildclient-dist, so it can also get picked up by nitropublicAssets[]Screenshots or Videos
No response
Platform
Additional context
No response