Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlarocque/fcm-esm-bundle
https://github.com/dlarocque/fcm-esm-bundle
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dlarocque/fcm-esm-bundle
- Owner: dlarocque
- Created: 2024-09-12T15:44:10.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T15:31:47.000Z (4 months ago)
- Last Synced: 2024-11-07T12:17:17.914Z (3 months ago)
- Language: HTML
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FCM with ESM in SW
Firebase Cloud Messaging currently don't support ESM syntax (`import ... from ...`). For most users, the solution to this is to use the `-compat` bundles imported from the CDN.
For users who wish to use ESM syntax, they must bundle their service worker file into a `firebase-messaging-sw.js` file that does *not* use ESM syntax. This repository provides an example for how to do that.