DEV Community

loading...

Discussion on: Let Users Know When You Have Updated Your Service Workers in Create React App

Collapse
glukmann profile image
Gert Glükmann Author

Hi!
You have create another file where you add the eventListener for message yourself (as shown in one of the gists) and then append that file to created service worker on build time. This can be done for example with github.com/tszarzynski/cra-append-sw.
Let me know if you have any troubles.

Collapse
manuelurbanotn profile image
manuelurbanotn

Hi Gert!
Finally I noticed that my app has Workbox integrated to Webpack, so I fixed it adding skipWaiting: true on my Webpack config.

Thanks for your time!

Thread Thread
niketsoni profile image
Niket Soni

Hey buddy! Thank you so much for your comment here. It worked for me like magic :)

Forem Open with the Forem app