|
2 | 2 |
|
3 | 3 | ## Changes Made |
4 | 4 |
|
5 | | -### 1. Moved Vercel Configuration to Root ✅ |
| 5 | +### 1. Removed Vercel Configuration File ✅ |
6 | 6 |
|
7 | | -**Deleted**: `client/vercel.json` |
| 7 | +**Deleted**: `vercel.json` (at root) |
8 | 8 |
|
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) |
29 | 13 |
|
30 | 14 | ### 2. Updated Root Package.json Scripts ✅ |
31 | 15 |
|
@@ -86,16 +70,16 @@ const validationCache = new Map<string, { |
86 | 70 | - TypeScript finds `tsconfig.json` with proper `@/` paths |
87 | 71 | - Resolves all module imports correctly |
88 | 72 |
|
89 | | -## Vercel Dashboard Settings |
| 73 | +## Vercel Dashboard Configuration |
90 | 74 |
|
91 | | -**Ensure these are set** (or use defaults): |
| 75 | +**Configure these settings in your Vercel dashboard**: |
92 | 76 |
|
93 | 77 | - **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` |
97 | 81 | - **Framework Preset**: Next.js |
98 | | -- **Node Version**: 20.x (current setting) |
| 82 | +- **Node Version**: 20.x |
99 | 83 |
|
100 | 84 | ## Expected Outcome |
101 | 85 |
|
@@ -133,27 +117,41 @@ cd client && pnpm build:skip-lint # Should complete |
133 | 117 | ## Next Deploy |
134 | 118 |
|
135 | 119 | 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) |
137 | 121 | 2. Run builds from root context |
138 | 122 | 3. Execute type-check from client directory |
139 | 123 | 4. Successfully build and deploy ✅ |
140 | 124 |
|
| 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 | + |
141 | 130 | ## Rollback Plan |
142 | 131 |
|
143 | 132 | If issues occur, you can quickly rollback: |
144 | 133 |
|
145 | 134 | ```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 |
151 | 149 |
|
152 | | -# Revert package.json changes |
| 150 | +# Revert package.json changes if needed |
153 | 151 | git checkout HEAD~1 -- package.json |
154 | 152 | ``` |
155 | 153 |
|
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. |
157 | 155 |
|
158 | 156 | --- |
159 | 157 |
|
|
0 commit comments