Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Conversation

IjzerenHein
Copy link
Contributor

This PR add support for putting the firebase web configuration in app.json. This is uses for auto-configuration of firebase on Web and to make Firebase Analytics possible on the standard Expo Client, through a pure JS Firebase Analytics tracker which requires the web-config measurementId.

/**
* [Firebase Configuration Object](https://support.google.com/firebase/answer/7015592) Firebase web configuration.
*/
firebase?: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps googleServicesFile so it matches iOS and Android?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially considered that as well, but was having trouble parsing the file through the webpack plugin. My code wasn't being called in places where I expected it. And in createEnvironmentConstants I couldn't access (or don't know how to safely) the project-root.

Do you have any recommendations for me?

Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine. We'll need to be careful because setting the Constants in web is somewhat fragile and most likely won't work in Next.js.

@IjzerenHein IjzerenHein merged commit ee26c1f into master Feb 20, 2020
@IjzerenHein IjzerenHein deleted the @hein/web-firebase-config branch February 20, 2020 13:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants