Skip to content

Remove TSX from components.json #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gainlinejono
Copy link
Contributor

@gainlinejono gainlinejono commented Jul 30, 2025

As @patrickdundas highlighted in #166, the transition from typescript to tsx in the vue-starter-kit has introduced an issue that breaks the ability to add components via the CLI.

Upon further investigation, @patrickdundas found that the root of the issue lies in how components.json is handled differently between the shadcn and shadcn-vue packages:

shadcn-vue defaults to using typescript in its schema.

shadcn, on the other hand, defaults to tsx.

When reverting the tsx setting back to the typescript and setting it to true, component generation works as expected, but not for 3rd party plugins. However, if you then attempt to set typescript to false, it breaks the generation process again.

This makes the setting somewhat redundant, as both tsx and typescript are enabled by default, and neither can reliably be set to false without causing issues.

Removing the explicit line for typescript (tsx) resolves the incompatibility between the two schema implementations and restores full CLI support for component generation, including compatibility with third-party plugins.

This change ensures consistency and prevents unexpected behaviour regardless of which underlying schema is used.

- The schema for shadcn and shadcn-vue has differing lines for typescript.
- shadcn-vue uses typescript
- shadcn uses tsx.
- However if setting typescript to false, there is an error when adding components via CLI, this makes the setting redundant as it's true by default
- To avoid compatibility removing this lines fixes compatibility and also allows generation of components to work.
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.

1 participant