I am building a site in react and I make use of capacitor to build mobile apps. I've managed to build successfully to the google play store and the apple app store once. Then I added firebase for mobile notifications and added on-site features, that turned out to break the iOS build of capacitor.
TypeError: undefined is not an object (evaluating 'navigator.serviceWorker.addEventListener')
URL: capacitor://localhost/static/js/hash.chunk.js
Debug tips as well as solutions would be appreciated!