PART 01
Core concepts
Native ESM, the unified Rolldown architecture, dep pre-bundling, the module graph.
- 1.1Native ESM and Browser-Native ModulesThe foundation of Vite — what are browser-native ES Modules? Where does the `<script type="module">` boundary sit? Why can Vite's dev server start without bundling?
- 1.2Vite 8's Unified ArchitectureHow does Rolldown unify the dev and build phases? What is the architectural evolution compared to the dual-engine era of Vite 5/6/7?
- 1.3Dependency Pre-BundlingWhy does Vite pre-bundle node_modules? What changes when Rolldown takes over pre-bundling? How does the .vite/deps cache work?
- 1.4Module GraphVite maintains a complete module dependency graph in memory — it is the foundation of HMR and the core of the Environment API. You can't truly understand Vite without understanding the Module Graph.
- 1.5Env Variables and ModesUnderstand import.meta.env, .env priority, VITE_ prefixes, envPrefix, loadEnv, HTML replacements, and the difference between mode and NODE_ENV.
- 1.6Source Features: CSS, JSON, Glob, WASM, and WorkersVite includes modern source handling for CSS, JSON, import.meta.glob, dynamic imports, WebAssembly, Web Workers, and CSP-sensitive assets.