Answer the question
In order to leave comments, you need to log in
How to organize firebase imports in files?
Hello everyone: 3
Guys, such a question, but how to make it so that I can import firebase into one file and initialize it, and then transfer its functions to others if necessary? I use Webpack 4 :)
When I try to do this, I run into errors :(
In the main firebase.js file there is
import * as firebase from "firebase/app"
import "firebase/auth";
import "firebase/database";
firebase.initializeApp(config);
export var auth = firebase.auth();
console.log(auth)
everything works great! :) Failed to resolve module specifier "firebase/app" . Relative references must start with either "/", "./", or "../".
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question