esbuild Pre-Bundling vs Rollup Build: Keeping Vite Dev and Production Aligned
Vite deliberately runs two pipelines: in dev, dependencies are pre-bundled to ESM by esbuild and cached under node_modules/.vite , while production builds go through Rollup. This split is documented architecture, not an accident, and it creates a real interoperability question for teams shipping packages that mix CommonJS and ESM entry points. The constraint