You can only have one service worker (besides the firebase-messaging-sw.js). In this code I have that functionality combined together github.com/devpato/creating-a-pwa-...
Thank you for the quick response! So just to confirm, with this, the sw.js is able to function properly and firebase is still able to talk to the background app without us registering it on our side?
you will have the firebase-messaging-sw.js and the sw.js file like I did on the repo. Make sure the firebase-messaging-sw.js has that name. That's how firebase code will look for that file
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can only have one service worker (besides the firebase-messaging-sw.js). In this code I have that functionality combined together github.com/devpato/creating-a-pwa-...
Thank you for the quick response! So just to confirm, with this, the
sw.jsis able to function properly and firebase is still able to talk to the background app without us registering it on our side?you will have the firebase-messaging-sw.js and the sw.js file like I did on the repo. Make sure the firebase-messaging-sw.js has that name. That's how firebase code will look for that file