From 8b5684ae212c1f2e4cb1a225839f0c7f14816eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Neves?= Date: Wed, 17 Jun 2026 10:03:38 +0000 Subject: [PATCH] docs: fix DEPLOYMENT_VERCEL.md vercel.json examples to match actual config The Configuration section showed a vercel.json example with unnecessary default fields (devCommand, installCommand) and was missing the framework field that tells Vercel to use Vite-optimized settings. Updated to match the project's actual vercel.json. The Troubleshooting rewrites example showed only a rewrites block, which would overwrite the project's existing build configuration if copied verbatim. Changed to show the full config with rewrites merged in. --- DEPLOYMENT_VERCEL.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/DEPLOYMENT_VERCEL.md b/DEPLOYMENT_VERCEL.md index 67b3339..47d4504 100644 --- a/DEPLOYMENT_VERCEL.md +++ b/DEPLOYMENT_VERCEL.md @@ -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. @@ -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" } ]