Vite dependency pre-bundling: why dev goes stale and how optimizeDeps fixes it
Vite pre-bundles node_modules with esbuild in dev, so a stale optimized bundle is usually a cache and discovery problem — not a broken install.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Vite pre-bundles node_modules with esbuild in dev, so a stale optimized bundle is usually a cache and discovery problem — not a broken install.
Learn how Waku’s dev server watches files, rebuilds only changed modules, and serves assets with cache‑busting headers so you can see updates in the browser without manual refreshes.
Vite pre-bundles your dependencies with esbuild at dev-server startup, turning hundreds of module requests into one per package. Here's how it works, how to verify it, and when to tune optimizeDeps.
Vite pre-bundles CommonJS dependencies with esbuild at startup to serve native ES modules instantly. Learn how the cache works, how to tune optimizeDeps, and the trade-offs for dev server speed.
Get a Vite dev server running, prove HMR actually works via the WebSocket check, and fix the common Docker/reverse-proxy cases where hot reload silently fails.
Vite speeds up dev server startup by pre‑bundling node_modules with esbuild, caching the result, and letting you control the process via optimizeDeps. Learn how it works, its limits, and practical checks.
An architecture note on Vite's HMR: why serving native ES modules instead of a bundle makes updates near-instant, where the trust boundaries sit, and the circular-import and dev/prod divergence failure modes to watch for.
A step‑by‑step diagnostic guide for when Vite’s dev server stalls on 'Optimizing dependencies…' due to Node version, esbuild, dependency count, or native addons.
A concise architecture note that explains what Vite’s HMR needs, how it is built, where trust is enforced, how it operates, and when it falls back to a full reload.