How to stop the warning: It looks like you're using the development build of the Firebase JS SDK?

前端 未结 3 2058
旧时难觅i
旧时难觅i 2021-02-20 02:55
It looks like you\'re using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK c         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-20 03:55

    To answer this question a little more clearly,

    What you most likely have is

    
    

    Because this is what Firebase gives you from the "Add Firebase to your web app" screen.

    However, what this is doing is importing all of the Firebase modules. I don't know why Firebase has this as the generated script, but all you need to do is add -app to the source so it is now.

    
    

    Then with every subsequent feature of Firebase you would like to use, you would will need to add another script line. For example, if you would like to add cloud messaging to your web app it would only need.

    
    
    

    You can find more information including a complete list of imports here from Firebase.

提交回复
热议问题