generateSW prompt
: successfully refresh and reload on user input
#771
Unanswered
lafleurdeboum
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I've been experimenting with
vite-plugin-pwa
, and I found out that one can easily get stuck at the user input step - more precisely, at the new service worker activated and waiting. Indeed, the old worker will wait until all opened connections close before handing the control. It took me hours to find out who was the culprit, and in my case it was a Server-Sent Events connection still waiting for input at that point, but that could be any other long-lasting connection. I found out after reading this issue onworkbox-routing
.I'm currently using
vite-plugin-pwa
with React, and I solved this with this node :and then use it like
so that
NodeWithLongLastingConnection
gets suspended when the app has refreshed and the old Service Worker needs a network-down instant to hand the control to the new one.I think there's hours worth of my work here, wanted to contribute it in thanks for the great plugin. Perhaps would it deserve an explanation in the docs ? What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions