I just spent the afternoon trying to figure out @nuxtjs/pwa Workbox module with almost no results. I'm not a pro at this and I'm starting to be completely lost >< Any help will be reaaaally appreciated please!
The only thing working is caching the HTML/CSS/JS structure of visited page. I reckon this comes out of the box. Even if it seems to be a bug and it should cache all routes https://github.com/nuxt-community/pwa-module/issues/24 ?
That's one of the thing I would like to do: having at least the structure of every pages precached but I have no clue on how to achieve this.
The other one is I would like to cache API responses I receive on GET requests on the go. So if app is offline, at least the user could see the precached structure with the last downloaded data. I tried something like this but no results.
runtimeCaching: [
{
urlPattern: `${WEBSITE.URL}/api/.*`,
strategyOptions: { cacheableResponse: { statuses: [0, 200] } },
},
],
I've got like a thousand questions in my head but I'll start with those parts and hope a kind soul is ready to help me. ^^ Thanks!