| name | build-and-deploy |
| description | Build and deploy this React + Vite application. Use when building, deploying, or preparing the project for production. |
Build and Deploy React + Vite
CRITICAL: For Vercel, use
vercel build --prodthenvercel deploy --prebuilt --prod.
Tech Stack
- Framework: React 19
- Build Tool: Vite 7
- Language: TypeScript
- Package Manager: npm
- Output:
distdirectory - Port: 5173
Workflow
1. Install Dependencies
npm install
2. Build
npm run build
3. Deploy
Vercel (Recommended):
vercel pull --yes -t $VERCEL_TOKEN
vercel build --prod -t $VERCEL_TOKEN
vercel deploy --prebuilt --prod --yes -t $VERCEL_TOKEN
Netlify:
netlify deploy --prod --dir=dist
Development
npm run dev
Opens at http://localhost:5173
Notes
- TypeScript compilation runs before build (
tsc -b && vite build) - ESLint configured with React hooks and refresh plugins
- Hot Module Replacement (HMR) enabled in development