| name | build-and-deploy |
| description | Build and deploy this React admin dashboard. Use when building, deploying, or preparing the project for production. |
Build and Deploy Mantis React Admin
CRITICAL: For Vercel, use
vercel build --prodthenvercel deploy --prebuilt --prod.
Tech Stack
- Framework: React 19 with Vite 7
- UI Library: Material UI v7 (MUI)
- Styling: Emotion CSS-in-JS
- Routing: React Router v7
- State: SWR for data fetching
- Build Output:
dist/directory
Workflow
1. Install Dependencies
yarn install
2. Build
yarn build
This runs vite build which creates an optimized production build in dist/.
3. Deploy
Vercel:
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
Start local dev server:
yarn start
Preview production build:
yarn preview
Linting
yarn lint # Check for issues
yarn lint:fix # Auto-fix issues
yarn prettier # Format code