Closed akauppi closed 3 years ago
Upstream tickets that have to do with this:
Note: The ticket may actually be two different things. Loading Firebase (as pure ESM, in browser) like documents suggest it to be done, and being able to use Firebase-UI from
npm
.
FirebaseUI work under:
Firebase loading recommendation has been changed (8.0.0) to import firebase from 'firebase
.
Firebase can now be loaded as expected (at least in Vite). FirebaseUI issues remain.
Also FirebaseUI loaded via import
but doesn't quite work. Next version coming to this repo, however, will completely import
those libs. Once that happens, this issue can be closed.
Implied change: web no longer needs to set up the firebase
global.
bygones
Something is wrong with firebase npm packaging.
It is intended to be loaded as:
If we do this,
firebase.initializeApp
is undefined and we don't get the app started, at all.This works:
This provides
firebase.initializeApp
and we get Firebase running. However, if we try to load Firebase UI via npm, this happens:In browser console:
Same symptoms as here (Jul 2019).
Steps to reproduce:
pr-issue-7-firebaseui
README.md
npm run dev
Expected:
You'd get a UI in localhost://3000/signin
Actual:
Empty screen and in browser console:
What's going on?
Is there some ES module specific problem that causes this?
Is the Firebase UI loading problem connected to us loading Firebase wrong, or are they unrelated?
Why doesn't the recommended ES module way of loading Firebase work?
Is there an app sample that uses Vite or Rollup and has both Firebase and Firebase UI, via npm? Would love to find one.
Current work-around
Loading Firebase UI in
index.html
- not via npm. Ideally, we'd like to take it via npm because:node 14.5.0 firebase 7.15.5 firebaseui 4.5.1 Chrome 83 on macOS