Closed bhaskarGyan closed 1 year ago
The option is not implemented yet, there's no 1:1 features with Nuxt 2 PWA, but this is going to change, I've plans for many things for this module for this start of the year.
Current solution is to implement your own workbox worker (for this module, the worker template is available here : https://github.com/kevinmarrec/nuxt-pwa-module/blob/main/templates/workbox/sw.js
May be a bit related to https://github.com/kevinmarrec/nuxt-pwa-module/issues/63 regarding caching
Hi,
I am trying to precache all the assets on load using WB
precacheAndRoute
but I am not able to find this option in the Module.Similar implementation in vite-plugin-pwa[https://vite-pwa-org.netlify.app/workbox/inject-manifest.html] where it can inject self.__WB_MANIFEST during build time.
I tried using below custom build script after
nuxt build
is donebut nuxt don't allow modifying the file under
.output dir
after the buildI also tried with
build:done
hooks, but looks like it's too late by then to modify any file.It's not possible to run the above script before build, since there won't be any file generated for caching