@nuxtjs/workbox: service workers fetch resources by wrong URL

Darkside73
40
Darkside73
commented 3 years ago

All nuxt bundles are served by URLs starting with /_nuxt. But service workers try to fetch them without this prefix. I think it should work with default options.
BTW: I've tried to use modifyUrlPrefix to fix:

modifyUrlPrefix: {
  '/': '/_nuxt/'
}

but no success

bug
0
pi0
39.6k
pi0
commented 3 years ago

Hi. Yes known issue with latest workbox upgrade, I'm currently working on it please let me know if any success :))

0
pi0
39.6k
pi0
commented 3 years ago

Found it!!

modifyUrlPrefix: {
  '': '/_nuxt/'
}
1
pi0
39.6k
pi0
commented 3 years ago

Should be fixed with [email protected].

0
pi0
39.6k
pi0
commented 3 years ago

Ahh another issue regexes are broken too!

0
pi0
39.6k
pi0
commented 3 years ago

Should be fixed with "@nuxtjs/workbox": "^1.1.1". Also working with offline too:
Demo: https://nuxt-pwa.glitch.me
https://glitch.com/edit/#!/nuxt-pwa?path=package.json:9:4

0
Informations
Bug Report โ€ข Open
#c46 - Created 3 years ago