In Firebase Modular SDK (v9+), why is tree-shaking more effective compared to previous versions?
Think about how importing only what you need affects the final bundle size.
Modular SDK uses named imports, so bundlers like Webpack or Rollup can remove unused parts, making the app smaller.
Which import statement correctly imports Firestore functions for tree-shaking in Firebase Modular SDK (v9+)?
Look for the import that uses named imports from the specific service path.
Modular SDK requires importing functions directly from the service path to enable tree-shaking.
What happens to your app's bundle size if you import the entire Firebase namespace instead of using Modular SDK imports?
Consider what happens when you import everything even if you use only a small part.
Importing the entire namespace includes all Firebase services, increasing bundle size and slowing load times.
If you only import Authentication and Firestore from Firebase Modular SDK (v9+), what happens to the code for other Firebase services like Storage?
Think about how tree-shaking removes unused code from the bundle.
Modular SDK allows bundlers to exclude unused services like Storage if they are not imported, reducing bundle size.
What is a potential security risk of importing the entire Firebase SDK instead of using Modular SDK imports in a production app?
Think about how unused code can affect app security.
Including unused Firebase services can expose more code paths and increase the chance of vulnerabilities or misconfigurations.