Use Firebase Emulator without an internet connection

Viewed 324

It seems that when you use the firebase emulator but have no internet connection you can't load the firebase scripts like http://localhost:5000/__/firebase/8.4.2/firebase-app.js the local server that is created by firebase emulator must be actually fetching the firebase-app.js from google firebase servers and serving that back through localhost.

Is it possible to use Firebase Emulator without an internet connection?

1 Answers

The __ local handler here does not do much more than redirect the SDKs on the internet. Otherwise the emulator suite would have to include a lot of versions of all Firebase SDKs, which is not feasible.

So if you want full offline development, you'll have to include the SDKs from a local path that is part of your own web app, or ensure they are preloaded and cached from a CDN before you go offline.

Related