Auto config Firebase SDK in React

后端 未结 2 826
终归单人心
终归单人心 2021-02-06 03:27
  • I have a React app that I\'d like to deploy to multiple environments (dev, staging, prod).
  • each env is a separate Firebase project with its own config (apiKey, da
相关标签:
2条回答
  • 2021-02-06 03:38

    Found this firebase-CLI command:

    firebase setup:web --json

    It will output the json required for initialising the firebase app based on the active firebase app (firebase use). Just need to include the resulting json in the build chain.

    0 讨论(0)
  • 2021-02-06 03:45

    firebase setup:web --json has been deprecated.

    You can now use firebase apps:sdkconfig web --json instead.

    Full info here.

    0 讨论(0)
提交回复
热议问题