I am attempting to reduce the firebase library size in my vuejs app. I currently import firebase as
import * as firebase from 'firebase';
require("firebase/firestore");
Inside my vendor file I have the database and messaging services but I have no use for them.
How do I go about only importing auth and firestore into firebase object?
Import firebase and firebase/authimport firebase from "firebase/app"; import "firebase/auth"; Place a FirebaseAuthProvider component at the top level of your app. ( anywhere as long as it's above the other Auth components ). Then use any of the other components anywhere in your component tree.
You can use Firebase Authentication to allow users to sign in to your app using one or more sign-in methods, including email address and password sign-in, and federated identity providers such as Google Sign-in and Facebook Login.
First you need to import the core
import * as firebase from 'firebase/app';
then import required modules
import 'firebase/auth';
import 'firebase/firestore';
or
var firebase = require("firebase/app");
require("firebase/auth");
require("firebase/database");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With