Auto config Firebase SDK in React

后端 未结 2 832
终归单人心
终归单人心 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.

提交回复
热议问题