-
Notifications
You must be signed in to change notification settings - Fork 28
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
firebase.auth is not a function #107
Comments
Can you provide a reproducible example? Just trying it out, and I'm getting the same result between Nollup and Rollup. For the code to work, you should switch from namespace import to default import for
|
Upon further digging, this seems to be some weird documentation / TypeScript problem with Firebase: firebase/firebase-js-sdk#3315 (comment) Not entirely sure what's going on, but it sounds like their documentation assumes you're using TypeScript, and that TypeScript has a different behaviour for resolving namespace imports. I think TypeScript has a flag that allows the namespace import to work even though it's a default export. Very weird and goes against the ESM spec. |
Here's a minimal example. Run Rollup will throw an error because there's no config, but it loads firebase correctly. |
Running dev for Rollup doesn't show me anything but "Cannot GET /" :( |
Closing as the original issue was with Firebase's documentation. |
I'm using Firebase in a project. I believe there is some issue when using nollup and the firebase imports:
import 'firebase/auth'
andimport 'firebase/analytics'
. When I run the following with nollup I get the error:Uncaught (in promise) TypeError: firebase.auth is not a function
However, when I run using plain rollup, I do not get this error. Any ideas?
The text was updated successfully, but these errors were encountered: