0๐
@Onyoursix, Try to place firebase-messaging-sw.js into the public folder like {project_root}\public\firebase-messaging-sw.js and try with the below code and remove everything relevant to firebase push notifications code
importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-messaging.js');
var config = {
apiKey: "{YOUR_APIKEY}",
authDomain: "{YOUR_AUTH_DOMAIN}",
databaseURL: "{YOUR_DATABASE_UR}",
projectId: "{YOUR_PROJECT_ID}",
storageBucket: "{YOUR_STORAGE_BUCKET}",
messagingSenderId: "{YOUR_MESSAGING_SENDER_ID}",
appId: "{YOUR_APP_ID}"
}
firebase.initializeApp(config)
const messaging = firebase.messaging();
- [Vuejs]-ReferenceError in mounted hook in threejs
- [Vuejs]-Safari iframe's service worker loops infinitely and iframe is a white screen (not in other browsers, not in a new tab)
Source:stackexchange.com