So I have a config directory where I set up some tooling. In this case, it was Firebase. Firebase can get pretty large.
I have a config file that sets up firebase itself, and another I was using for Firestore. They are both rolled up into a index.ts file.
export * from './firebase-client.config';
export * from './firestore-client.config';
I was removing Firestore and moving to only APIs. In a completely clean Astro build, I found that my bundle was still including the base Firestore lib. The import from firestore-client.config.ts is just a function that gets the database instance. It doesn't do anything outside of that function (no initing code). No other code in the site imported this function. Yet the Firestore ESM bundle was still included when I built the site.
It seems that this should have been pruned out via treeshaking?