I'm building an Angular web app, and I was importing like this:

import * as firebase from 'firebase';
db = firebase.firestore();

But lately I keep getting this error:

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

import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

and so, naturally, I changed it to this:

import * as firebase from 'firebase/app';
import 'firebase/firestore';
db = firebase.firestore();

but the error didn't go away. I don't understand how to remove it?

0 Answers