Deploy to Vercel
Deploying Shapeless to Vercel works like any modern Next.js app, including OpenNext features. This guide covers the essentials for a smooth deployment.
Deployment Steps
-
Configure Client URL
Update your API client to use the correct URL depending on environment:
@/shapeless.client.ts
-
Deploy Your App
-
Connect your GitHub repo to Vercel via the dashboard
-
Vercel automatically detects and builds your Next.js/OpenNext app
-
Alternatively, deploy manually using the Vercel CLI:
Environment Variables
Set your environment variables via the Vercel dashboard:
- Go to your project
- Open Settings > Environment Variables
- Add variables as needed
Alternatively, use the CLI:
Common Issues
CORS Configuration
If you face CORS errors, ensure your API router includes CORS middleware: