What are the key differences between Vite and Create React App?
Hint
Vite uses native ES modules in dev — instant server start vs CRA's webpack bundle
Full Answer
CRA (Create React App) is largely deprecated. Vite is the modern standard for React projects.
| Create React App | Vite | |
|---|---|---|
| Dev server start | 30-60s (bundles everything) | <300ms (no bundling) |
| HMR (hot reload) | Slow (rebundles) | Instant (native ESM) |
| Build tool | webpack | Rollup + esbuild (Rolldown from Vite 8) |
| Config | Ejection required | vite.config.ts |
| Maintenance | Unmaintained | Actively maintained |
// Vite dev — serves files directly as ES modules
// Browser requests /src/App.tsx → Vite transforms just that file → instant
// CRA dev — bundles ALL files on start, then watches
// Every change → re-bundle affected module graph → slow
// Starting a new project
npm create vite@latest my-app -- --template react-ts
# vs
npx create-react-app my-app --template typescript # avoid
Alternatives for production apps:
- Next.js — SSR, SSG, RSC, file-based routing
- React Router v7 (formerly Remix) — full-stack, nested routing, web standards
- Vite + React Router — SPA with full control
💡 The React team no longer recommends CRA. Their official docs point to Next.js, React Router v7 (formerly Remix), or Vite as starting points depending on your needs.
More Ecosystem Questions
Practice this in a timed sprint
5 free questions, no signup required