Vite is a modern build tool with lightning-fast dev server using native ES modules (no bundling during development) and optimized production builds with Rollup. It's faster because it serves files on-demand instead of bundling everything upfront.
Why Vite is Fast:
Development:
Production:
Vs Traditional Bundlers:
Features:
# Create new Vite project
npm create vite@latest my-app
# Choose framework: React, Vue, Svelte, etc.
# Choose variant: JavaScript or TypeScript
cd my-app
npm install
npm run dev # Start dev server
npm run build # Production build
npm run preview # Preview production build
# Project structure
my-app/
├── index.html # Entry point
├── package.json
├── vite.config.js # Vite config
├── src/
│ ├── main.jsx # JS entry
│ ├── App.jsx
│ └── index.css
└── public/ # Static assets