Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename service-worker.js to firebase-messaging-sw.js #381

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Sep 12, 2024

The documentation says that "In order to receive the onMessage event, your app must define the Firebase messaging service worker in firebase-messaging-sw.js" FCM docs, so the name of the file used for the snippet should reflect this, otherwise users may run into issues if they try to copy it.

Default SW name: https://github.com/firebase/firebase-js-sdk/blob/main/packages/messaging/src/util/constants.ts#L18

image

cl/673852085 (internal)

Firebase Messaging Service workers must be named
`firebase-messaging-sw.js`. The name of this file should reflect that
requirement, since users can be misled by the incorrect name, and run
into issues if they try to copy it.
@dlarocque dlarocque marked this pull request as draft September 12, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant