Skip to content

Commit

Permalink
fix: updated error msg for jsconfig in cli (#1696)
Browse files Browse the repository at this point in the history
* fix: updated error msg for jsconfig in cli

* chore: add changeset

* style(cli): format

---------

Co-authored-by: shadcn <[email protected]>
  • Loading branch information
KMJ-007 and shadcn authored Oct 21, 2023
1 parent b8810ca commit 5a13def
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-pants-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"shadcn-ui": patch
---

use jsconfig for non-ts projects
4 changes: 3 additions & 1 deletion packages/cli/src/utils/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
}

Expand Down

0 comments on commit 5a13def

Please sign in to comment.