Mục tiêu: Hiểu kiến trúc Vite, tại sao nhanh, plugin system, và thiết lập production-ready React + Vite project.
1. Vite Architecture - Tại Sao Nhanh?
Dev Server: ESBuild + Native ESM
Webpack (truyền thống):
┌──────────┐ ┌──────────────────┐ ┌──────────┐
│ Entry │───→│ Bundle ALL │───→│ Dev │
│ Point │ │ modules (slow!) │ │ Server │
└──────────┘ └──────────────────┘ └──────────┘
↑
Mỗi lần save: rebuild toàn bộ bundle