feat(core): Firestore-memory and Firestore/Storage/Database-lazy entries #2679
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@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 withsample/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 casesPerformanceMonitoringService
now uses Zone.js's start marker for increase accuracy onisStable
and will trackprebootComplete
if you're using prebootfromTask
more, allowing it to take in an already created/started task