Vite¶
Vite is the development and build tool used by this frontend. It provides a fast development server with hot module replacement (HMR) and a modern build pipeline for production.
Why Vite?¶
- Fast cold-start and HMR for React development.
- Modern ES module-based build optimized for production.
- Integrates easily with TypeScript, React and various plugins used in this project.
How this project uses Vite¶
- Entry and config:
app/frontend/vite.config.tsconfigures plugins (React plugin, optional type checking plugin) and build options. - Development: run
npm run devinsideapp/frontendto start the Vite dev server. - Environment variables: Vite exposes env vars prefixed with
VITE_;VITE_API_URLis read inapp/frontend/src/config.tsx.
Build¶
- Production build is executed via
npm run buildwhich runstsc -b && vite buildso TypeScript is fully built before bundling.