diff --git a/.changeset/smart-pants-smile.md b/.changeset/smart-pants-smile.md new file mode 100644 index 00000000000..b353ce7110e --- /dev/null +++ b/.changeset/smart-pants-smile.md @@ -0,0 +1,5 @@ +--- +"shadcn-ui": patch +--- + +use jsconfig for non-ts projects diff --git a/packages/cli/src/utils/get-config.ts b/packages/cli/src/utils/get-config.ts index b6376d70294..4ea29431c2b 100644 --- a/packages/cli/src/utils/get-config.ts +++ b/packages/cli/src/utils/get-config.ts @@ -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() ) }