The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Quick start

Participate in the Alpha Group

All of the resources for this program are open to the public. However, we really want to hear from you. Our Alpha Group is simply a GitHub Discussion Board. Let us know about your thoughts and experience using the new SDK. What did you like? Was there a reduction in your bundle size? What bundler did you use? What did you not like? Did it work with your framework? Let us know.

Installation

The experimental modular library is available on npm under the exp tag. All of the work done on the library is also public on GitHub as well.

To get the experimental library use the @exp tag.

npm i firebase@exp
# OR
yarn add firebase@exp

Initialization

This library has the same features and functionality as the existing Firebase library, but the code has a different organization. Currently the library is set up with a "namespace" organization. The new organization allows Firebase to take advantage of tree-shaking in module bundlers and give you smaller bundle sizes for your sites and applications.

import { initializeApp } from 'firebase/app';
const firebaseApp = initializeApp({ /* config */ });

This is a significant change, but it is imperative in creating faster and smaller Firebase apps. If you want a detailed explanation of why, check out the next section.