fix: updated error msg for jsconfig in cli (#1696)

* fix: updated error msg for jsconfig in cli

* chore: add changeset

* style(cli): format

---------

Co-authored-by: shadcn <m@shadcn.com>
This commit is contained in:
Karan Janthe
2023-10-21 18:05:55 +05:30
committed by GitHub
parent b8810caac7
commit 5a13def46d
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"shadcn-ui": patch
---
use jsconfig for non-ts projects

View File

@@ -65,7 +65,9 @@ export async function resolveConfigPaths(cwd: string, config: RawConfig) {
if (tsConfig.resultType === "failed") {
throw new Error(
`Failed to load tsconfig.json. ${tsConfig.message ?? ""}`.trim()
`Failed to load ${config.tsx ? "tsconfig" : "jsconfig"}.json. ${
tsConfig.message ?? ""
}`.trim()
)
}