Skip to content

Commit 16d4d38

Browse files
fix(tanstack): fix paths value in tsconfig and check for tanstack start in devDeps also (#6590)
* fix(docs): tanstack start guide fix the paths value in tsconfig * fix(tanstack): check for @tanstack/start in devDependencies as well * chore: changeset * fix(shadcn): tanstack detection --------- Co-authored-by: shadcn <m@shadcn.com>
1 parent 5234c46 commit 16d4d38

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.changeset/spotty-plants-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"shadcn": patch
3+
---
4+
5+
fix tanstack check

apps/www/content/docs/installation/tanstack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Add the following code to the `tsconfig.json` file to resolve paths.
9494
"strictNullChecks": true,
9595
"baseUrl": ".",
9696
"paths": {
97-
"@/*": ["./src/*"]
97+
"@/*": ["./app/*"]
9898
}
9999
}
100100
}

packages/shadcn/src/utils/get-project-info.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ export async function getProjectInfo(cwd: string): Promise<ProjectInfo | null> {
119119
// TanStack Start.
120120
if (
121121
configFiles.find((file) => file.startsWith("app.config."))?.length &&
122-
Object.keys(packageJson?.dependencies ?? {}).find((dep) =>
123-
dep.startsWith("@tanstack/start")
124-
)
122+
[
123+
...Object.keys(packageJson?.dependencies ?? {}),
124+
...Object.keys(packageJson?.devDependencies ?? {}),
125+
].find((dep) => dep.startsWith("@tanstack/start"))
125126
) {
126127
type.framework = FRAMEWORKS["tanstack-start"]
127128
return type

0 commit comments

Comments
 (0)