ViVite · Lesson 1 of 6
Why Vite?
Webpack bundles everything on start. With 10,000 modules that's 30+ seconds. Vite skips bundling during dev — the browser loads ES modules directly. That's a 2-second start regardless of project size.
Vite solves two problems: slow dev server startup (because old tools pre-bundle everything) and slow HMR (Hot Module Replacement). Vite uses native browser ES modules during development — no bundle at all. For production builds, it uses Rollup for optimized output.
◆ Note
Unlike Webpack, Vite's entry point is `index.html` at the project root, not a JavaScript file. Vite parses the HTML to find `<script type="module">` tags and uses those as entry points. This matches how the browser natively loads ES modules.
Unlike Webpack, Vite's entry point is `index.html` at the project root, not a JavaScript file. Vite parses the HTML to find `<script type="module">` tags and uses those as entry points. This matches how the browser natively loads ES modules.