chore(shadcn): fix tsconfig + components.json for current CLI

The shadcn-vue CLI (verified against
https://www.shadcn-vue.com/docs/installation/vite) requires path
aliases declared with both baseUrl and paths in tsconfig.json AND
tsconfig.app.json. Without baseUrl the CLI's resolvedPaths validator
fails with:

  Validation failed:
  - resolvedPaths: Required,Required,Required,Required,Required

(one Required per declared alias under "aliases" in components.json).

Also drop two stale keys from components.json that newer shadcn-vue
schema versions reject:

  - "framework": "vite"   → no longer part of the schema
  - "tailwind.config": "" → empty string fails validation; field is
                            optional for Tailwind 4 (no JS config file)

After this commit, "pnpm dlx shadcn-vue@latest add <component>"
succeeds out of the box.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-08 22:33:03 +02:00
commit 063ece498e
3 changed files with 8 additions and 3 deletions

View file

@ -3,13 +3,11 @@
"style": "default", "style": "default",
"typescript": true, "typescript": true,
"tailwind": { "tailwind": {
"config": "",
"css": "src/style.css", "css": "src/style.css",
"baseColor": "neutral", "baseColor": "neutral",
"cssVariables": true, "cssVariables": true,
"prefix": "" "prefix": ""
}, },
"framework": "vite",
"aliases": { "aliases": {
"components": "@/components", "components": "@/components",
"composables": "@/composables", "composables": "@/composables",

View file

@ -4,6 +4,7 @@
"exclude": ["src/**/__tests__/*"], "exclude": ["src/**/__tests__/*"],
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
} }

View file

@ -1,4 +1,10 @@
{ {
"files": [], "files": [],
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" }] "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" }],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
} }