🔥 Firebase Client Setup

Setup the Firebase JS SDK in SvelteKit

Install Firebase JS

command line
npm i firebase

Client SDK Setup

file_type_typescript lib/firebase.ts
import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
import { getAuth } from "firebase/auth";
import { getStorage } from "firebase/storage";

const firebaseConfig = {
    // your config
};

// Initialize Firebase
export const app = initializeApp(firebaseConfig);
export const db = getFirestore();
export const auth = getAuth();
export const storage = getStorage();

Questions? Let's chat

Open Discord