Skip to content

fix(cli): support evaluating tsconfig.app.json for import aliases#10175

Open
aakarsh12x wants to merge 2 commits intoshadcn-ui:mainfrom
aakarsh12x:feat/issue-10135
Open

fix(cli): support evaluating tsconfig.app.json for import aliases#10175
aakarsh12x wants to merge 2 commits intoshadcn-ui:mainfrom
aakarsh12x:feat/issue-10135

Conversation

@aakarsh12x
Copy link
Copy Markdown

This pull request introduces a fallback inside the CLI's getTsConfigAliasPrefix initialization preflight to automatically locate import aliases defined in tsconfig.app.json (or tsconfig.web.json).

Previously, if a user scaffolded a modern Vite application, their aliases would be tucked into tsconfig.app.json. Because tsconfig-paths specifically targeted tsconfig.json without recursively expanding the references array, the CLI would falsely throw the "No import alias found" error. This fallback logic taps directly into the existing schema-based getTsConfig utility to check these app-level configurations when the primary lookup yields an empty paths object.

Related Issue
Fixes #10135

Checklist

  • I have read the contributing guidelines.
  • I have formatted and checked the code via pnpm typecheck.
  • The CLI initialization now gracefully handles modern Vite scaffolds out-of-the-box without requiring users to duplicate their paths in tsconfig.json.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 25, 2026

Someone is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Unable to setup with Vite and Yarn

1 participant