Skip to content

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