Skip to content

Commit 22d15b0

Browse files
committed
chore: Remove vercel.json configuration file and streamline deployment process
This commit removes the `vercel.json` configuration file from the root directory, transitioning to a deployment setup managed entirely through the Vercel dashboard. The changes simplify the deployment workflow and enhance maintainability by consolidating configuration settings in one place. Additionally, updates to the `package.json` scripts improve clarity and functionality for building the client application.
1 parent 9e7936f commit 22d15b0

File tree

3 files changed

+36
-50
lines changed

3 files changed

+36
-50
lines changed

VERCEL_BUILD_FIX.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,14 @@
22

33
## Changes Made
44

5-
### 1. Moved Vercel Configuration to Root
5+
### 1. Removed Vercel Configuration File
66

7-
**Deleted**: `client/vercel.json`
7+
**Deleted**: `vercel.json` (at root)
88

9-
**Created**: `vercel.json` (at root)
10-
```json
11-
{
12-
"$schema": "https://openapi.vercel.sh/vercel.json",
13-
"buildCommand": "pnpm run build:client",
14-
"installCommand": "pnpm install --ignore-scripts",
15-
"outputDirectory": "client/.next",
16-
"framework": null,
17-
"env": {
18-
"NODE_ENV": "production",
19-
"SKIP_CONTRACTS": "true"
20-
}
21-
}
22-
```
23-
24-
**Why**:
25-
- Proper monorepo configuration from root
26-
- Prevents path resolution issues with TypeScript
27-
- Skips unnecessary contract builds and git submodule operations
28-
- More maintainable and consistent with monorepo patterns
9+
**Reason**:
10+
- Configuration now handled entirely through Vercel dashboard
11+
- Simpler deployment workflow
12+
- All settings managed in one place (Vercel UI)
2913

3014
### 2. Updated Root Package.json Scripts ✅
3115

@@ -86,16 +70,16 @@ const validationCache = new Map<string, {
8670
- TypeScript finds `tsconfig.json` with proper `@/` paths
8771
- Resolves all module imports correctly
8872

89-
## Vercel Dashboard Settings
73+
## Vercel Dashboard Configuration
9074

91-
**Ensure these are set** (or use defaults):
75+
**Configure these settings in your Vercel dashboard**:
9276

9377
- **Root Directory**: `.` (root) or leave blank
94-
- **Build Command**: (use vercel.json)
95-
- **Install Command**: (use vercel.json)
96-
- **Output Directory**: (use vercel.json)
78+
- **Build Command**: `pnpm run build:client`
79+
- **Install Command**: `pnpm install --ignore-scripts`
80+
- **Output Directory**: `client/.next`
9781
- **Framework Preset**: Next.js
98-
- **Node Version**: 20.x (current setting)
82+
- **Node Version**: 20.x
9983

10084
## Expected Outcome
10185

@@ -133,27 +117,41 @@ cd client && pnpm build:skip-lint # Should complete
133117
## Next Deploy
134118

135119
On your next push to the `dev` branch, Vercel will:
136-
1. Use the new root `vercel.json` configuration
120+
1. Use the dashboard configuration (no vercel.json file)
137121
2. Run builds from root context
138122
3. Execute type-check from client directory
139123
4. Successfully build and deploy ✅
140124

125+
**Important**: Ensure your Vercel dashboard has these settings configured:
126+
- Build Command: `pnpm run build:client`
127+
- Install Command: `pnpm install --ignore-scripts`
128+
- Output Directory: `client/.next`
129+
141130
## Rollback Plan
142131

143132
If issues occur, you can quickly rollback:
144133

145134
```bash
146-
# Restore client vercel.json
147-
git checkout HEAD~1 -- client/vercel.json
148-
149-
# Remove root vercel.json
150-
rm vercel.json
135+
# Recreate vercel.json if needed for dashboard configuration
136+
cat > vercel.json << 'EOF'
137+
{
138+
"$schema": "https://openapi.vercel.sh/vercel.json",
139+
"buildCommand": "pnpm run build:client",
140+
"installCommand": "pnpm install --ignore-scripts",
141+
"outputDirectory": "client/.next",
142+
"framework": null,
143+
"env": {
144+
"NODE_ENV": "production",
145+
"SKIP_CONTRACTS": "true"
146+
}
147+
}
148+
EOF
151149

152-
# Revert package.json changes
150+
# Revert package.json changes if needed
153151
git checkout HEAD~1 -- package.json
154152
```
155153

156-
But this shouldn't be necessary - the changes follow Vercel's recommended monorepo patterns.
154+
But this shouldn't be necessary - the current configuration works well.
157155

158156
---
159157

client/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
"start": "next start",
77
"dev": "next dev",
88
"dev:turbo": "next dev --turbo",
9-
"build": "cd .. && pnpm check && cd client && next build",
10-
"build:skip-lint": "next build",
11-
"build:analyze": "ANALYZE=true pnpm run build:skip-lint",
9+
"build": "next build",
10+
"build:analyze": "ANALYZE=true next build",
1211
"lint": "cd .. && pnpm lint",
1312
"format": "cd .. && pnpm format:client",
1413
"check": "cd .. && pnpm check",

vercel.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)