-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Explicitly say that 'firebase/firestore' must be imported #2333
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
Conversation
It is easy to miss this import and don't understand why this quickstart doesn't work.
Co-Authored-By: Michael Prentice <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for sending in a PR, but this should not be necessary. When you import the |
Maybe it should, but it doesn't.
Indeed, if the |
It seems like this inclusion of the associated Are there some cases where including the |
I've also just run into the same issuw trying to use AngularFirestoreModule. I had to explicitly declare Angular: 9.0.0 |
The developer will need to import the Firebase component themselves in the non-lazy modules; Firestore, Database, and Storage if they're using the AngularFire v6 release candidate. FYI @davideast @Splaktar. Importing these modules ourselves was breaking in Ivy/ngcc during the Angular v9 release candidates, I have meant to check if the change is ultimately needed in Angular 9.0-stable. It was due to ngcc not understanding the bare import had side-effects. Marking side effects in the library had other negative consequences, so in the meantime yes, this PR is valid. The "lazy" modules are side-effect free due to their dynamically importing the required Firebase SDK component, making the required API changes for Firestore, Database, and Storage just didn't make the cut for v6. I hope to have lazy versions of these modules in v6.1, which we will then make the default in v7. Sorry about the radio silence here, I'm back working on AngularFire this week and will be trying to wrap the RC phase and get v6 out the door; including PRs such as this (unless I can revert the change.) If I'm unable to revert than we will need to make it very explicit in the docs & put it in the upgrade schematic. |
I've confirmed that NGCC does not strip the bare imports & the side-effects remain in place as expected (except for Firestore, for which I have a work around). I'll be reverting this change in RC.2 (#2347) |
Checklist
Description
It is easy to miss the 'firebase/firestore' import and don't understand why this quickstart doesn't work.