Skip to content

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.
@taylorotwell taylorotwell merged commit e6cd4de into laravel:main Aug 14, 2025
2 checks passed
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.

2 participants