Joaquín Sánchez

Results 1398 comments of Joaquín Sánchez

@fredpedersen so the root/base for the app is `/build`? can you change the build/dist folder in laravel?

@anburocky3 @fredpedersen can you try using this? ```ts plugins: [ VitePWA({ outDir: 'public', }) ], ``` EDIT: this way you don't need to switch to manual injection, and you will...

Check my previous comment, I add EDIT entry: then in your layour you can just use in `resources/js/app.ts`: ```ts import { registerSW } from 'virtual:pwa-register' /*other code*/ registerSW({ immediate: true...

For the web manifest you can use this another virtual `virtual:pwa-info`: ```ts import { pwaInfo } from 'virtual:pwa-info' if (pwaInfo) { const webManifest = pwaInfo.webManifest.linkTag console.log(pwaInfo) /* add link to...

for example, we use it in SvelteKit layout: https://github.com/vite-pwa/sveltekit/blob/main/examples/sveltekit-ts/src/routes/%2Blayout.svelte

@anburocky3 where is `index.html`? if you are using `/` instead, just add `workbox.navigateFallback = '/'` to pwa options

@anburocky3 check the build folder and remove `public/build/sw.js` and `public/build/registerSW.js`

`virtual:pwa-info` dts: https://github.com/vite-pwa/vite-plugin-pwa/blob/main/info.d.ts

about `virtual:pwa-info` you can check if present, if so, you can create the link manually, it was created to use it in meta framework integrations (SvelteKit and Astro) https://github.com/vite-pwa/astro/blob/main/examples/pwa-prompt/src/layouts/DefaultLayout.astro#L31