Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Do you have features like auto update or at least some api to detect when the page needs refresh. #58

Open
re2005 opened this issue Oct 22, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@re2005
Copy link

re2005 commented Oct 22, 2022

I use vite-plugin-pwa in other projects and they provide a way to detect when the page needs an update.

How can we do the same with this plugin?

Thanks!

@kevinmarrec
Copy link
Owner

Hi @re2005 , it requires you to use custom Service Worker template, you have a little notice about the option here : https://github.com/kevinmarrec/nuxt-pwa-module#configuration

@kevinmarrec kevinmarrec added the question Further information is requested label Nov 7, 2022
@re2005
Copy link
Author

re2005 commented Nov 9, 2022

Hey @kevinmarrec thanks.

But is not a clear path on how to easily implement the same very useful features that vite-plugin-pwa provides.

If you could indicate here, on how to detect when the page needs an update and also how to trigger the workbox to unregister the worker and refresh, invalidating the old cache, would be really amazing.

Thanks

@kevinmarrec
Copy link
Owner

@re2005

For the short answer it's mainly about Workbox knowledge which should be found in their respective documentation, but the objective is to have a clear path as you asked.

We have a plan at Nuxt team to make this module official with an up to date documentation.
I'll try to have instructions about how to achieve what you mentioned here.

And

@kevinmarrec kevinmarrec added the documentation Improvements or additions to documentation label Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants