Solution 1 :

As explained in the doc,

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

is the core Firebase SDK and is always required and must be listed first. But then you need to add the imports for the other SDKs you plan to use, like, for example:

<script src="https://www.gstatic.com/firebasejs/7.11.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.11.0/firebase-firestore.js"></script>

On the other hand, you can include the entire Firebase JavaScript SDK, rather than individual SDKs, as follows:

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

Doing this way, all the Firebase SDKs will be imported, but it is not recommended for production apps, as stated in the doc.

Problem :

When you want to add firebase to a web application it gives you some links to write in the html file. I’ve coppied and pasted those links in my project but an error appeared in the console. I’ve realized that writing (taking out “-app” in one of the links):

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

instead of:

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

works perfectly.
Is that normal? Am I doing something wrong?

By