Skip to content

Commit ecbd38e

Browse files
committed
refactor: replace deprecated sanity-typegen.json with inline typegen configuration
- Removed the obsolete sanity-typegen.json file. - Integrated typegen configuration directly into the Sanity CLI setup, ensuring schema extraction and type generation are streamlined within the cliConfig.
1 parent 404acba commit ecbd38e

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎apps/web/sanity-typegen.json‎

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

‎apps/web/sanity.cli.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@ export default defineCliConfig({
66
projectId: process.env.SANITY_STUDIO_PROJECT_ID || "hfh83o0w",
77
dataset: process.env.SANITY_STUDIO_DATASET || "production",
88
},
9+
// Replaces the deprecated sanity-typegen.json. The schema is extracted in
10+
// apps/sanity (sanity schema extract --> ../sanity/extract.json).
11+
typegen: {
12+
path: "./**/*.{ts,tsx,js,jsx}",
13+
schema: "../sanity/extract.json",
14+
generates: "./sanity/types.ts",
15+
},
916
});

0 commit comments

Comments
 (0)