Hi! Sorry if this was already asked. I’m upgradin...
# javascript
s
Hi! Sorry if this was already asked. I’m upgrading firebase in a multiplatform project that has a JS target. Previous firebase versions that supported
import * as firebase from 'firebase/app';
& I could do the following:
Copy code
@JsModule("firebase/app")
external object firebase {
  ...
}
But now in their docs it’s
import firebase from 'firebase/app';
and I’m getting
TypeError: $module$firebase_app.initializeApp is not a function
Anyone have an idea how to properly import this?
Found a way
Copy code
@file:JsModule("firebase/app")

package ...

import ...

@JsName("default")
external object firebase {
  ...
}
👍 3
t
firebase
object is redundant if
firebase/app
contains many declarations (classes/methods)