Joaquín Sánchez
Joaquín Sánchez
@damienmontastier @alvarosabu https://github.com/Tresjs/post-processing/pull/152
I'm going to prepare another PR here (will supersede this PR), we only need to do some hack before registering the imports...
Are you changing the base URL at runtime? Pwa needs base at build time, you can use the `base` pwa option.
can you try with `base: '/gb/'`? Looks like a bug on the vite-plugin-pwa or here...
Anyway, I'll try to add support for dynamic base url for nuxt via custom client (dev and build)
Check the examples folder in this repo. You cannot install the pwa from js, you can only intercept browser event (when supported) to replace default behavior (right now mobile only)...
https://github.com/vite-pwa/nuxt/blob/main/playground/layouts/default.vue#L35
elk.zone doesn't use any cookie, use local storage to store some data, here the key for previous welcome dialog:
You should move the sw.js from public folder to src folder changing the strategies to `intectManifest`: - on dev, it works since you're registering the sw.js yourself, pwa plugin generating...
```js if ('serviceWorker' in navigator) { navigator.serviceWorker.register( import.meta.env.MODE === 'production' ? '/sw.js' : '/dev-sw.js?dev-sw', { type: import.meta.env.MODE === 'production' ? 'classic' : 'module' } ) } ```