nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
642 stars 98 forks source link

It looks like you're using the development build of the Firebase JS SDK. #327

Closed cliffordh closed 4 years ago

cliffordh commented 4 years ago

Receiving this in the browser console. Any ideas?

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/');

ES Modules: import firebase from 'firebase/app'; import 'firebase/';

Typescript: import * as firebase from 'firebase/app'; import 'firebase/';

cliffordh commented 4 years ago

was using import firebase from 'firebase' instead of using this.$fireAuth as firebase nuxt registers firebase automatically

ilyary commented 3 years ago

thank you for hint!

I imported firestore.FieldPath like this: import firebase from 'firebase' const {firestore: {FieldPath}} = firebase

and got the same issue

now I use db.firestore.app.firebase_.firestore.FieldPath in inner functions. Where db = firestore.collection('some_colection'), for example