Supported environments for the Firebase JavaScript SDK

Supported environments

TheFirebaseJavaScript SDK is officially supported in the following environments.

Important: You still need toinclude polyfills for environments thatdon't support the features required by Firebase.

Browsers

Firebase productEdgeFirefoxChromeiOS SafariSafari
Firebase AI Logic1
Analytics
App Check
Authentication
Cloud Firestore
(except
persistence)

(except
persistence
if iOS < 10)
Cloud Functions
Firebase installations
Cloud Messaging
(Edge 17+, except mobile)
Cloud Storage
Data Connect
Performance Monitoring
Realtime Database
Remote Config

1Firebase AI Logic was formerly called "Vertex AI in Firebase".

Other environments

Firebase productReact NativeNode.js (18+)Chrome
Extensions
Cordova
Firebase AI Logic1
App Check
(using acustom provider to do native device attestation)

(using acustom provider)
Analytics
Authentication
(seeNote)

(seeNote)

(seeNote)

(seeNote)
Cloud Firestore
(except
persistence)

(except
persistence)
Cloud Functions
Data Connect
Firebase installations
Cloud Messaging
Cloud Storage
(except
uploads)
Performance Monitoring
Realtime Database
Remote Config

1Firebase AI Logic was formerly called "Vertex AI in Firebase".

Note: AllAuthentication features,except phone authentication and popup/redirect OAuth operations, are supported.

Polyfills

TheFirebaseJavaScript SDK is built on the latest standards of the web platform. Someolder browsers and JavaScript environments do not support all the featuresrequired by Firebase. If you must support these browsers/environments, then youneed to load polyfills accordingly.

The sections below identify most of the polyfills you might need.

Required polyfills

EnvironmentsPolyfills
Safari 7 & 8 & 9ES Stable
Node < 10ES Stable

Optional polyfills

EnvironmentsPolyfillsFirebase products
  • Safari < 10.1
  • iOS < 10.3
fetch
  • Authentication
  • Cloud Firestore
  • Cloud Functions
  • Performance Monitoring
  • Node < 18
fetch
  • Authentication
  • Cloud Firestore
  • Cloud Functions
  • Cloud Storage
  • React Native and Expo
base-64
  • Cloud Storage

Suggested polyfills

PolyfillsLicense
ES StableMIT
fetch - `cross-fetch` - best for older browsersMIT
fetch - `undici` - best for Node.jsMIT
base-64MIT

Required Polyfill Setup for React Native and Expo

For React Native and Expo if you are uploading a base-64 encoded string, you need to do the following:

Installbase-64 from npm:

npm install base-64

Importdecode frombase-64 and attach it to the global scope asatob soCloud Storage can access it.

import{decode}from'base-64';if(typeofatob==='undefined'){global.atob=decode;}

Add polyfills in your application

Option 1:(Recommended) Use bundler integrated with Babel

If you're using a bundler, integrate withBabel and@babel/preset-env to getpolyfills.

Use Babel's interactivesetup guide to learnhow to integrate Babel with your bundler.

With Babel, you don't need to worry about the exact polyfills to include.Instead, you specify the minimal browser environments that you need to support.Babel then adds the necessary polyfills for you. Babel ensures that yourrequirements for browser support are always met, even if Firebase or your owncode starts using new ES features.

@babel/preset-env has detailedinformation about the available configuration options for specifying environmenttargets (optiontargets) and adding polyfills (optionuseBuiltIns).

Note: If you're using a framework, the work of configuring Babel and addingpolyfills might be different or actually already handled for you. Refer toBabel's interactivesetup guide for moreinformation.

Option 2:(Not Recommended) Add polyfills manually

You can add polyfills manually using your favorite polyfill libraries (forexample,core-js).

import'core-js/stable'import'cross-fetch/polyfill';

core-js also provides anall-in-one polyfill filethat you can directly include in the HTML page.

This option can be a convenient way for managing polyfills if you don't useBabel. However,we don't recommend this all-in-one option for productionapps as it will likely include unnecessary polyfills, which increases the pageweight and hence the page load time.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.