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

前端 未结 3 2061
旧时难觅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:48

    Your error message tells you how to fix it... this part right here:

    For the CDN builds, these are available in the following manner
    (replace  with the name of a component - i.e. auth, database, etc):
    
    https://www.gstatic.com/firebasejs/5.0.0/firebase-.js
    

    So if you're using Firebase authentication you'd have a script tag requesting https://www.gstatic.com/firebasejs/5.0.0/firebase-auth.js ... and for the Firebase database you would also have another script tag with https://www.gstatic.com/firebasejs/5.0.0/firebase-database.js .... just following that pattern for any other portions of Firebase you need.

提交回复
热议问题