Reputation: 16122
I want to get rid of the following warning message apparently Firebase is sending to my console.
I've search for "firebase" in my console and got "690 results in 49 files."
I'm confused about why this is showing up and what I can do about it.
What, exactly, is triggering it? Is it possible to get rid of the warning message or not? If so, how, exactly?
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 module builds, these are available in the following manner (replace with the name of a component - i.e. auth, database, etc):
CommonJS Modules:
const firebase = require('firebase/app');
require('firebase/<PACKAGE>');
ES Modules:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
Typescript:
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
Upvotes: 1
Views: 923
Reputation: 67
import Firebase from 'firebase/app' //firebase-app
import 'firebase/firestore' //
import { firebase } from 'firebase/storage' //firebase-storage
Upvotes: 1
Reputation: 18595
It's telling you to import only the packages you need vs importing the kitchen sink / dev package. See Add Firebase to your JavaScript Project and notice the various packages.
firebase-app — The core firebase client (required) firebase-auth — Firebase Authentication (optional) firebase-database — Firebase Realtime Database (optional) firebase-firestore — Cloud Firestore (optional) firebase-storage — Cloud Storage (optional) firebase-messaging — Firebase Cloud Messaging (optional) firebase-functions — Cloud Functions for Firebase (optional)
Upvotes: 2