Skip to content
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

Inconsistent component import examples #1388

Closed
phenomen opened this issue Oct 28, 2024 · 3 comments
Closed

Inconsistent component import examples #1388

phenomen opened this issue Oct 28, 2024 · 3 comments
Labels
type: documentation A change or addition to the documentation

Comments

@phenomen
Copy link

Change Type

Correction

Proposed Changes

Every component in the docs has different ways of importing a component — one with /index.js and then without it in the Usage section. For example https://next.shadcn-svelte.com/docs/components/button

image

I think it should not append /index.js anywhere as it's not required.

@phenomen phenomen added the type: documentation A change or addition to the documentation label Oct 28, 2024
@shyakadavis
Copy link
Contributor

Actually, (unless I'm wrong), because of "verbatimModuleSyntax": true, the /index.js is required.

@shyakadavis
Copy link
Contributor

Guess I could take my time to update others places in docs, unless there's an objection.

@huntabyte
Copy link
Owner

We will use /index.js everywhere as it provides the widest compatibility regardless if you're building a library, app, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

3 participants