-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Too many index.svelte files in SvelteKit demo app #1874
Too many index.svelte files in SvelteKit demo app #1874
Comments
This would be a breaking change as the semantics for |
@dummdidumm No, the change i suggest is not for the src/routes/**/*.svelte, its for the src/lib/**/*.svelte If you want to write any component the demo template suggests to create a folder with the component name with an index.svelte inside. |
Ah okay, thanks for the clarification. So this is only about the setup template showcasing something which is not ideal in your opinion (which I agree with in this case btw). |
Describe the problem
Describe the proposed solution
Rename the "src/lib/Counter/index.svelte" to "src/lib/Counter/Counter.svelte"
Keep the
src/routes/todos/index.svelte
as-is, that filename is used for routing.(I'd personally would split the rendering of the form of into a component, but for example-code it's easier to digest if it remains in a single file )
Alternatives considered
I've worked with vue and react codebases that worked with lots of index.ts files. When I've renamed these files to have meaningful and predictable filenames the reaction has been universally positive.
An alternative is to do nothing, the filename convention in the example does not affect how we setup a svelte-kit project.
Importance
nice to have
The text was updated successfully, but these errors were encountered: