CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Fix Vercel deployment configuration for monorepo structure #4516

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/setup-vercel-bookaride-v2-d5cfemainopened Mar 5, 2026
ccantynzcommented Mar 5, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/BookarideV2/pull/1


Summary

Updated Vercel deployment configuration to properly support the monorepo structure by creating a root-level vercel.json configuration while adjusting the frontend-specific configuration for correct path resolution.

Key Changes

  • Created root vercel.json: Added a new configuration file at the project root that specifies the correct build command (cd frontend && npm install && npm run build) and output directory (frontend/dist) for the monorepo structure
  • Updated frontend/vercel.json: Modified the frontend-specific configuration to use relative paths (npm install && npm run build, dist) since it will be executed from within the frontend directory
  • Added SPA routing: Implemented URL rewrite rules (/(.*) → /index.html) in both configurations to properly handle client-side routing for single-page applications

Implementation Details

The changes establish a proper deployment strategy for a monorepo where:

  • Vercel uses the root configuration to understand the project structure and build from the correct directory
  • The frontend configuration uses relative paths appropriate for its directory context
  • Both configurations include SPA routing rewrites to ensure all routes are served by the frontend application

https://claude.ai/code/session_017cCnug3uxjgsu996XWF5ac

ccantynzcommented Mar 5, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bookaride-v2 Ready Ready Preview, Comment Mar 5, 2026 8:20am

Request Review

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts