-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: basic svelte
templates
#170
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 62cfd9f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
svelte
templatessvelte
templates
I think the only open question here is the ordering of the templates, i have screenshotted my preferred way above. We might need to improve the hints to make the differences clearer for the user ◆ Which template would you like? Another thing might be that we should unify the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I filed the issue (#168) to bring this up for discussion, I'm worried about this confusing more users than it helps and that it raises the mental overhead and number of decisions that need to be made upfront.
If we include it, I would put it last and be clear that it's not something most users should reach for.
See these types of discussions:
https://www.reddit.com/r/sveltejs/comments/110kzpw/when_should_i_use_sveltekit_and_when_should_i_use/
https://www.reddit.com/r/sveltejs/comments/tv93l2/sveltekit_or_svelte_vite/
To quote khromov from that thread:
You should pretty much always use SvelteKit.
The exception are some edge cases where you might want some type of very specific bundling behavior, or when you are embedding the Svelte application into another non-Svelte site.
For example, when building Svelte UI in a WordPress plugin you might want to get just one resulting bundle file instead of the route-optimized builds SvelteKit generates. In this case you probably also don't care about routing, so the Vite version is a good alternative.
I also saw a number of users not understanding that you can build SPAs in SvelteKit (there are a couple of issues we should solve there, but I'd rather fix those than fragment the community and cause confusion).
I also think that we should make Routify a community adder. It's not what we would recommend folks to use as SvelteKit has 200x more usage and a number of developers working on it vs just a single developer.
Part of our job here is to lead users down a happy garden path and so I think we need to be careful here
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Yeah, i had in mind that you mentioned this somewhat recently somewhere. I'm happy to close this as, this was a nice experiment to understand what |
I don't really know what the right answer is. It could make sense, but we need to be careful around how we present it, so should probably take some time post-launch to make sure we're doing it in a way that helps makes things clearer for users. I do worry about giving people an option with no docs and then they don't know what to do with it. I think that adding a docs page to svelte.dev about when and when not to use SvelteKit and how to accomplish different goals with it (SPA, embedded app, etc.) and how to build something with plain Vite is probably the first step |
Closes #168
Notes:
kit
condition for all 3 svelte templates that we had before. This was necessary since all the files we had before did not go well with thesvelte
templatetbd:
vite-env.d.ts
is renamed tovite-env.d.ts
. Do we even need this file?svelte
template (and possibly other templates, to avoid confusion)