Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions DEPLOYMENT_VERCEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,20 @@ This runs `npm run build && vercel --prod`.

## Configuration

### vercel.json (Optional)
### vercel.json

Create a `vercel.json` file in your project root for custom configuration:
The project includes a `vercel.json` with the following configuration:

```json
{
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "build",
"devCommand": "npm run dev",
"installCommand": "npm install"
"outputDirectory": "build"
}
```

The `framework` field tells Vercel to use Vite-optimized settings. The `buildCommand` and `outputDirectory` fields ensure Vercel uses the correct build output path. If you need to add custom configuration (e.g., rewrites), merge them into the existing file rather than replacing it.

### Environment Variables

No environment variables are required for the base application.
Expand Down Expand Up @@ -91,10 +92,13 @@ Check the build logs in your Vercel dashboard. Common issues:

### 404 errors on page refresh

This is a common issue with single-page applications. Create a `vercel.json`:
This is a common issue with single-page applications. Add the following rewrites to the project's existing `vercel.json`:

```json
{
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "build",
"rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]
Expand Down
Loading