Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Darkside73 opened this issue Jul 19, 2017 · 5 comments
Closed

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

Darkside73 opened this issue Jul 19, 2017 · 5 comments
Labels

Comments

@Darkside73
Copy link

Darkside73 commented Jul 19, 2017

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

This bug report is available on Nuxt.js community (#c46)
@pi0
Copy link
Member

pi0 commented Jul 19, 2017

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

@pi0
Copy link
Member

pi0 commented Jul 19, 2017

Found it!!

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

@pi0
Copy link
Member

pi0 commented Jul 19, 2017

Should be fixed with workbox@1.1.0.

@pi0 pi0 closed this as completed Jul 19, 2017
@pi0
Copy link
Member

pi0 commented Jul 19, 2017

Ahh another issue regexes are broken too!

@pi0
Copy link
Member

pi0 commented Jul 19, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants