Diagnosing Oversized Vite Production Bundles: esbuild Tree‑Shaking Failures
When Vite’s production build produces unexpectedly large bundles, the culprit is often esbuild’s minification and tree‑shaking logic. This guide walks through the common causes, step‑by‑step checks, and fixes to restore lean outputs.