SpeakEasy-tools / SpeakEasy

0 stars 0 forks source link

Fix firebase warning about production #110

Closed MasterOdin closed 4 years ago

MasterOdin commented 4 years ago

This gets rid of the following warning that was showing up in console:

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.

Essentially, anytime we want to use firebase within the application, you have to do:

import firebase from "firebase/app";

and then underneath additional imports for each piece of functionality of firebase you might use on that page. For example, on a page where might use auth, functions, and storage, it would be:

import firebase from "firebase/app";
import "firebase/auth";
import "firebase/functions";
import "firebase/storage";