Commit bb193a4
Miriad
fix: gracefully skip Sanity typegen when env vars unavailable
The prebuild typegen step fails on Vercel because sanity.config.ts
imports sanity/lib/api.ts which throws if NEXT_PUBLIC_SANITY_DATASET
and NEXT_PUBLIC_SANITY_PROJECT_ID are not set. Even though these are
configured in Vercel, they may not be available during the prebuild
phase.
This change makes typegen non-fatal — if it fails, the build continues
using the already-committed types in sanity/types.ts.1 parent 02914e2 commit bb193a4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments