Joaquín Sánchez
Joaquín Sánchez
> I saw the env vars and would run the `dev-destroy` or `dev-claims-destroy` scripts between changes is that not enough? :thumbsup: you only need to rebuild, restart the server and...
Replace the first 4 scripts with this ones (missing SW=true env var): ```json "dev": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true SW=true vite --force", "dev-claims": "rimraf dev-dist && DEBUG=vite-plugin-pwa SW_DEV=true CLAIMS=true SW=true...
Remove also the `import` in the `workerImport.js`, I'll send a PR to fix SW=true and the import tmr The docs specify what is running: https://vite-pwa-org.netlify.app/guide/development.html#example I'll remove only the import...
PR welcome to add a hint to run `dev` with `injectManifest` strategy in the development example section: https://vite-pwa-org.netlify.app/guide/development.html#example
You can write your "basic" service worker logic using `generateSW` or `injectManifest` strategies: `generateSW` should be used when you only need "basic " sw capabilities, workbox will use same transpilation...
I fix `packages/vite/src/client/overlay.ts` and `packages/vite/src/client/client.ts` checking for `typeof window`, but it seems we cannot use dynamic imports on service workers (I think on `web workers` should work): 
The link if someone interested: https://github.com/w3c/ServiceWorker/issues/1356
A question about building `vite`on local via `pnpm run build-vite` script: why each time I build `vite`, this file `packages/vite/LICENSE.md` is changed? All licenses removed: 
https://github.com/vite-pwa/vite-plugin-pwa/issues/218#issuecomment-1024580718
You should also exclude the html pages and their assets using globIgnores, but this would be a problem