firebase / firebase/snippets-web
How to set firebase config from env variable in service worker with next js?
Open
- Dominant language
- JavaScript
- Stars
- 802
- Forks
- 285
- PR merge metrics
- No merged PRs in 30d
Description
To receive the push notification in the background , need to init firebase sdk in the background using service worker as per [this doc](https://firebase.google.com/docs/cloud-messaging/js/receive#setting_notification_options_in_the_service_worker)
here when the Firebase config is added statically everything is working fine .
In service worker, process.env.ENV_NAME is not available, how to init SDK in server worker which allows to inject firebase config dynamically in Next Js via environment variable?
Contributor guide
Assessment
This issue has not been assessed yet.