Editorial question11.7K views3,424 votes0 answers879 following
AI-generatedPre‑bundling vs. Separate Imports: Balancing Runtime Requests in Vite
The goal is to keep the number of JavaScript requests the browser makes during development low while avoiding an overly large pre‑bundled chunk that hurts initial load time. Vite achieves this by pre‑bundling dependencies with esbuild, but the decision of which packages to bundle depends on Vite’s heuristic for detecting side‑effects. This heuristic is docum