如何停止警告:您似乎正在使用Firebase JS SDK的开发版本? [英] How to stop the warning: It looks like you're using the development build of the Firebase JS SDK?

查看:69
本文介绍了如何停止警告:您似乎正在使用Firebase JS SDK的开发版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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 components you intend to use.

For the CDN builds, these are available in the following manner
(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):

https://www.gstatic.com/firebasejs/5.0.0/firebase-<PACKAGE>.js

它占用了我已经有限的控制台空间的一半:(

注意:我在html ..中使用带脚本标签的firebase.我不使用此处说明的导入语法:

Note: I use firebase inside html .. with script tags. I don't use import syntax as explained here : similar question

如何停止此警告?

推荐答案

您的错误消息告诉您如何解决...此部分在这里:

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 <PACKAGE> with the name of a component - i.e. auth, database, etc):

https://www.gstatic.com/firebasejs/5.0.0/firebase-<PACKAGE>.js

因此,如果您使用Firebase身份验证,则会有一个脚本标签,请求 https://www.gstatic.com/firebasejs/5.0.0/firebase-auth.js ...并且对于Firebase数据库,您还需要使用 https://www.gstatic.com/firebasejs/5.0.0/firebase-database.js ....的另一个脚本标签,只需遵循以下模式即可您需要的Firebase其他任何部分.

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.

这篇关于如何停止警告:您似乎正在使用Firebase JS SDK的开发版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆