Skip to content

feat(core): Firestore-memory and Firestore/Storage/Database-lazy entries #2679

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

Closed
wants to merge 12 commits into from

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented Nov 20, 2020

@angular/fire/firestore/memory has a variant of AngularFirestore that uses the memory-only variant of the Firestore SDK as a side-effect. This is a slimmer version of the SDK that doesn't have offline-mode, great for cutting down bundle size & speeding things up if you don't intend to enable persistence.

This would be my recommendation for use in SSR, see the sample app where I'm using the memory-only variant on the server-side and persistence enabled in the browser by reexporting AngularFirestore in sample/src/firestore.ts and replacing that file with sample/src/firestore.server.ts on the server build.

#2370

Also I've added @angular/fire/firestore-lazy, @angular/fire/firestore-lazy/memory, @angular/fire/database-lazy, and @angular/fire/storage-lazy. I will need to work on docs for these & more testing.

Small things:

  • getDownloadURL pipe now does state-transfer, meaning if you use lazy you won't even have to load storage on the client side in simple cases
  • PerformanceMonitoringService now uses Zone.js's start marker for increase accuracy on isStable and will track prebootComplete if you're using preboot
  • ravamped fromTask more, allowing it to take in an already created/started task

@google-cla google-cla bot added the cla: yes label Nov 20, 2020
@jamesdaniels jamesdaniels added this to the 6.2 milestone Nov 20, 2020
@jamesdaniels

This comment has been minimized.

@jamesdaniels jamesdaniels changed the title feat(afs): Add Firestore memory-only variant feat(core): Firestore-memory and Firestore/Storage/Database-lazy entries Nov 26, 2020
@jamesdaniels
Copy link
Member Author

TODO pull the little stuff into a new PR

@jamesdaniels
Copy link
Member Author

Dropping most of this in favor of the minor stuff #2921

@jamesdaniels jamesdaniels deleted the firestore_memory_variant branch September 2, 2021 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant