GitHub

Vite Architecture: Feedback, Delivery, and Runtime Boundaries

Trace the graph from browser requests to deployed assets and runtime integrations

8 chapters72 min total
Keywords
ViteESMHMRModule graphDependency optimizationRolldownOxcPluginsSSREnvironment API
Overview

This series explains how Vite places work at different boundaries: native ESM and on-demand transforms keep changing source near the development feedback loop, dependency pre-bundling and the module graph manage compatibility and updates, and Rolldown/Oxc reorganize the same relationships for production delivery. It then follows plugins, SSR, backends, runtimes, performance, security, and evolving APIs, showing where Vite fits—and where browser, deployment, or runtime constraints still require explicit ownership.

Learning outcomes
  • Vite's development speed comes from on-demand source transforms, native ESM, dependency pre-bundling, and graph-guided HMR—not from eliminating the application graph.
  • Development and production optimize different waiting times: feedback for developers versus network delivery for users.
  • Plugins, frameworks, backends, and runtime providers help extend Vite when lifecycle, graph, execution, and state ownership stay explicit.
  • Vite's performance, correctness, and security depend on measured boundaries, from cache identity and HMR safety to output integration and public configuration.
Keywords
ViteESMHMRModule graphDependency optimizationRolldownOxcPluginsSSREnvironment API

Chapters

Preview every chapter · Unlock full text, audio, and video from chapter 4

Plans
Ch.1-3 FreeCh.4-8 Premium

FAQ

Why is Vite fast during development?

Vite is often fast in development because it serves native ESM and transforms requested source on demand instead of bundling the whole application first. It pre-bundles dependencies when package formats or internal fragmentation make direct browser loading impractical.

Why does Vite bundle for production if development uses native ESM?

Vite bundles for production because users should not discover long chains of imports one request at a time. Rolldown and Oxc shape code, CSS, assets, and preload metadata for the target browser and network.

How does Vite fit with frameworks, SSR, and backends?

Vite fits as a focused transformation and asset layer while frameworks can own rendering, backends can own HTML and routing, and SSR integrations can own server behavior. Plugins and environment APIs must still respect separate lifecycles and runtime graphs.

How should you diagnose a slow or unsafe Vite setup?

Diagnose Vite by locating the slow or exposed transition—startup, first-page requests, edits, builds, or deployment—then measure that owner. Verify cache state, plugin work, output integration, host and CORS rules, file access, public files, and client-visible configuration.