Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot lazily load firebase components #14

Closed
jshcrowthe opened this issue May 18, 2017 · 0 comments · Fixed by #15
Closed

Cannot lazily load firebase components #14

jshcrowthe opened this issue May 18, 2017 · 0 comments · Fixed by #15
Assignees

Comments

@jshcrowthe
Copy link
Contributor

jshcrowthe commented May 18, 2017

Describe your environment

  • Operating System version: macOS Sierra
  • Firebase SDK version: 4.0.0
  • Firebase Product: app

Describe the problem

firebase.js is a really large file and while you can load the individual pieces of the SDK (firebase-app, firebase-database, firebase-auth, etc) you have to do so before calling firebase.initializeApp(). This, for most use cases, means that developers load the entire firebase SDK before their app code which results in a lot of time blocking the main thread.

Steps to reproduce:

  1. Load firebase-app.js
  2. Initialize an app with firebase.initializeApp()
  3. Load firebase-database.js
  4. Try and call firebase.database()
  5. Observe error

Relevant Code:

http://jsbin.com/tovayaz/2/edit?js,console

@jshcrowthe jshcrowthe self-assigned this May 22, 2017
@firebase firebase locked and limited conversation to collaborators Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants