Answer the question
In order to leave comments, you need to log in
How to import only auth from firebase?
There is such a Firebase file:
import * as firebase from "firebase/app";
import "firebase/auth";
import "firebase/database";
var firebaseConfig = {
apiKey: "smth",
authDomain: "smth",
databaseURL: "smth",
projectId: "smth",
storageBucket: "smth",
messagingSenderId: "smth",
appId: "smth"
};
firebase.initializeApp(firebaseConfig);
export let auth = firebase.auth();
export let database = firebase.database();
import { auth } from "./firebase.js";
//какой-то код, который работает
import { database } from "./firebase.js";
//какой-то код, который тоже работает
const path = require("path");
module.exports = {
entry: {
auth: "./source/js/auth.js",
listRequests: "./source/js/listRequests.js",
},
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname, "source/js")
},
devServer: {
contentBase: path.join(__dirname, 'source/'),
port: 3000
}
}
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