Refactor FCM service worker

This commit is contained in:
Ben Goldsworthy 2020-12-01 11:52:10 +00:00
parent 7bed14e238
commit 547ad63812

View file

@ -0,0 +1,17 @@
import { environment } from "./environments/environment";
importScripts('https://www.gstatic.com/firebasejs/8.0.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/8.0.0/firebase-messaging.js');
firebase.initializeApp({
apiKey: environment.firebase.apiKey,
authDomain: environment.firebase.authDomain,
databaseURL: environment.firebase.databaseURL,
projectId: environment.firebase.projectId,
storageBucket: environment.firebase.storageBucket,
messagingSenderId: environment.firebase.messagingSenderId,
appId: environment.firebase.appId,
measurementId: environment.firebase.measurementId
});
const messaging = firebase.messaging();