I've seen https://firebase.google.com/docs/web/modular-upgrade which recommends moving to the Firebase Modular SDK. The recommended way to use it seems to be:
import { initializeApp } from "firebase/app"
import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, onAuthStateChanged } from "firebase/auth"
import { getDatabase, ref, set, update, get, push, serverTimestamp } from "firebase/database"
which works fine and is nicely tree-shakeable. But it creates lots of free functions with common names like set and get and update which impedes readability and can cause naming conflicts.
My question is whether it is OK to instead do:
import * as RTDB from "firebase/database"
and similarly for the others, and then use RTDB.update etc. Will that still be tree-shaken in all modern bundlers?