簡體   English   中英

警告“您似乎正在使用 Firebase JS SDK 的開發版本。”

[英]Warning "It looks like you're using the development build of the 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

我已經瀏覽了幾個與此問題相關的鏈接,但即使遵循了他們的所有解決方案,我也無法消除錯誤。 正如描述所說,使用給定的鏈接和我正在使用的組件的名稱。 我已經包含了我需要的鏈接,但我仍然看到警告。

我什至試圖包含 Firebase 網站中給出的所有鏈接,但我仍然看到它。

目前我只使用 Firebase 實時數據庫,但是在使用 CMD 創建 firebase init 時,我已經包含了函數、托管、存儲和數據庫。

<script src="https://www.gstatic.com/firebasejs/5.0.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.0.0/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.0.0/firebase.js"></script>

我什至嘗試將版本從 5.0.0 更改為 5.4.0,但沒有用。 如何解決這個問題?

我剛剛通過添加兩個腳本解決了它。

<script src="https://www.gstatic.com/firebasejs/5.0.2/firebase-app.js"></script>

<script src="https://www.gstatic.com/firebasejs/5.0.2/firebase-database.js"></script>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM