Comments (7)
Setting pwa.workbox.enable: false
, starting v0.16.0
, will indeed unregister the service worker. Your website won't be broken but would no longer be installable due to lack of service worker which is one of the conditions to fullfil PWA installation checks.
In other terms, it would make your app not a PWA anymore, and only laverage the metas & icons features.
from nuxt-pwa-module.
Also, it seems https://github.com/nuxt/nuxt/releases/tag/v3.2.2 has an experimental thing related to nuxt/nuxt#14594 you mentioned.
You may find more info on related merged PR nuxt/nuxt#19038 notes, in complement of nuxt/nuxt#14594 which has been tagged as resolved.
I don't think I can't help more as I think some of the 404
you're facing are kind of expected behavior when the user already loaded the page, while a new deployment is made and then he interacts or navigates with old chunks.
from nuxt-pwa-module.
Hi @kevinmarrec, yeah when I started this issue, I said that I wasn't sure yet whether it was related to nuxt3 or the PWA. And it turns out that Nuxt3 did not have the same chunk error catch that was baked into nuxt2 whenever a new deployment was made and a server was trying to fetch a cached file that no longer existed, which is now part of it. I'm going to deploy my project with this update tomorrow when I'm at work, and we will see if the error persists. If it does, then I will feel suspicious again of the service worker.
Thank you for all your help / explanations on everything here. I will keep you posted. :)
from nuxt-pwa-module.
@kevinmarrec any ideas here?
from nuxt-pwa-module.
Hi @jastaffen , we would need to compare files between deployments I guess, I think it's indeed related to the service worker caching assets, but it's hard to debug.
If you disable Service Worker with pwa.workbox.enabled: false
, your app won't be able to be installable anymore.
I think I have many improvements to provide around the default service worker to fix some issues, but my Workbox knowledge is limited, I'll need to dive more into it, along the documentation of this module.
If anyone want to have some try on their own regarding custom service worker, there's a pwa.workbox.templatePath
option mentioned in https://github.com/kevinmarrec/nuxt-pwa-module#configuration.
from nuxt-pwa-module.
I think we should find a way to reproduce it locally by running nuxi build
& nuxi preview
to simulate production build on localhost with Service Worker.
from nuxt-pwa-module.
Hi @kevinmarrec thank you for your in depth reply! I've come to realize that this issue is probably 2-pronged. One is that vite throws an error when it's unable to find a chunk that used to exist as part of a build and nuxt3 is not seamlessly catching those errors and updating the chunk asset (which is what happened under the hood in nuxt 3 [https://github.com/nuxt/nuxt/issues/14594]. The other probably does have to do with workbox's powerful caching mechanisms.
If I were to set pwa.workbox.enabled: false, are you saying that that would break the website or would it unregister the service worker and also mean that the website would no longer be installable on people's local devices? I definitely know less than you about workbox :). I think I'd like to remove it altogether but don't know how to do that and I'm concerned about the implications of doing so (functionality, performance, etc.).
from nuxt-pwa-module.
Related Issues (20)
- Only works with VPN HOT 7
- Dependency "sharp" cannot be installed in Docker container HOT 3
- Manifest properties don't default as expected
- Troubles with nuxt v3.6.1 HOT 1
- Change the name of the generated service worker
- How to cache custom page
- Is it possible to disable the PWA/worker on certain routes?
- Non-relative paths are not allowed when 'baseUrl' is not set. HOT 5
- sharp vulnerability CVE-2023-4863
- Icon missing: No match found for location with path HOT 1
- ERROR Cannot restart nuxt: The requested module '@nuxt/kit' does not provide an export named 'addImportsDir' HOT 4
- Module not working and all crashed HOT 35
- Futur of this module HOT 1
- Service worker stays registered when enabled is set to false HOT 2
- Add all available workbox configuration items HOT 2
- Failed to fetch dynamically imported module: http://localhost:3000/_nuxt/pages/index.vue?t=1676899295526 HOT 3
- A sharp module issue kills Nuxt HOT 3
- Typescript unknown property purpose: HOT 2
- Excluding certain files from being cached for online-offline detection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-pwa-module.