You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The website has a guide on getting started and the API reference. We'll be updating the site soon with a list of common use cases.
We hope you all like the new changes and we also hope to hear feedback from you over in our Admin SDK Discussion Board.
What's new in this version?
Admin SDK currently exposes a single global namespace that houses all other sub-namespaces, types and functions. The new version of the SDK exposes several module entry points, which allows you to import each Firebase product (e.g. Auth, Firestore, RTDB etc) separately.
Is it fully modular like the Beta Web SDK?
Not quite. While we expose different products as separate module entry points, the individual product-level operations are still exposed as methods on an object. In other words, the product-level operations are not treeshakeable. We drew the line here since further modularization does not result in significant gains in terms of import sizes, and also it’s more consistent with the other server-side Node.js libraries shipped by Google Cloud.
Can I use it with native ESM modules?
The Admin SDK is still shipped as a CommonJS (CJS) package, and currently doesn’t provide any ESM entry points. You can still use it with native ESM code (available in Node 12 and up), but you will have to use the ESM-CJS interop mode. This means you will not be able to use named imports. Let us know how important this use case is for your applications, and we can certainly revisit this topic in our next development iterations.
The text was updated successfully, but these errors were encountered:
Hey everyone,
We are introducing a new version of the Firebase Admin Node.js SDK.
If you are interested in trying it:
The website has a guide on getting started and the API reference. We'll be updating the site soon with a list of common use cases.
We hope you all like the new changes and we also hope to hear feedback from you over in our Admin SDK Discussion Board.
What's new in this version?
Admin SDK currently exposes a single global namespace that houses all other sub-namespaces, types and functions. The new version of the SDK exposes several module entry points, which allows you to import each Firebase product (e.g. Auth, Firestore, RTDB etc) separately.
Is it fully modular like the Beta Web SDK?
Not quite. While we expose different products as separate module entry points, the individual product-level operations are still exposed as methods on an object. In other words, the product-level operations are not treeshakeable. We drew the line here since further modularization does not result in significant gains in terms of import sizes, and also it’s more consistent with the other server-side Node.js libraries shipped by Google Cloud.
Can I use it with native ESM modules?
The Admin SDK is still shipped as a CommonJS (CJS) package, and currently doesn’t provide any ESM entry points. You can still use it with native ESM code (available in Node 12 and up), but you will have to use the ESM-CJS interop mode. This means you will not be able to use named imports. Let us know how important this use case is for your applications, and we can certainly revisit this topic in our next development iterations.
The text was updated successfully, but these errors were encountered: