-
Notifications
You must be signed in to change notification settings - Fork 81
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
Replace svelte template with sveltekit #340
Comments
The problem with sveltekit in context of a tauri app is its SSR-first approach which doesn't pair well with Tauri. Take that with a grain of salt though, I am a bit biased here because i tend to be the person who has to deal with most users' problems on discord etc |
Hey! Thanks for the input. Right I hadn't thought about the fact that some features are not really available when using the static adapter. I'm currently building something with sveltekit and I'll see how quickly I encounter problems, and then maybe I'll change my mind! |
I don't really think that SSR-first version of a framework is ever going to be included in CTA again because usually it needs a lot more configuration and overhead to disable SSR which is the main feature so it makes sense to choose SPA by default. |
Excluding it for maintainability is super fair - talking about sense making, I think anything that gets users working on what they care about fast has merits, and SvelteKit does that. The amount of work you have to do with the raw svelte app to even have two different pages is just not a great prototyping experience, in my opinion. Maybe the purpose of CTA could be more explicitly stated somewhere, I mistakenly thought it was to help get over all that initial configuration and into build mode, but excluding SvelteKit on account of much configuration seems to indicate the opposite? |
Same goes for React, Solid and even Vue but that is not a bad thing IMO, we give a starter and then you start composing your project as your needs grow. I know that SvelteKit has nice features overall but if I have to choose Svelte vs SvelteKit for create-tauri-app, I'd choose Svelte as it covers more user base because a SvelteKit user knows Svelte while the opposite is not true. |
I second this, Sveltekit is built by the same team as Svelte, there is no easy way to create a Svelte app without kit.
There is no routing solution for Svelte without the kit. It's not like the React ecosystem, where there's a multitude of different options. The most starred alternative, https://github.com/EmilTholin/svelte-routing, recommends using Sveltekit instead. While this decision seems to be in good faith, I believe it significantly increases the difficulty of using Tauri for Svelte users. Also, there are no Svelte docs for adding kit to regular Svelte, as Sveltekit is the default. |
As someone who is new to tauri (and Svelte for that matter) I can't really say much about the different considerations on whether to set up Svelte or SvelteKit through CTA. However, what I can give some feedback on is that at the moment the way the tauri Quick Start Guide is written with regards to setting up a new app using CTA is pretty confusing. Right at the top it says:
Reading this I checked out the guide on SvelteKit below (there isn't a guide for plain Svelte after all). The above statement somewhat implies that CTA would automate the process explained in the individual setup guides. However, as someone new to Svelte I only knew what the Svelte website tells you in their guide/tutorial, and their guide doesn't even mention how to work with a Svelte project without using SvelteKit. It took a lot of searching to finally find this very issue, because until then I had no idea why the template CTA created looked completely different than pretty much every resource you can find on Svelte (since the vast majority use SvelteKit). So, if there are technical considerations as to why CTA doesn't include SvelteKit that's fine by me, I lack the knowledge to judge. However, I think it should be made clear in the documentation that using CTA to scaffold a Svelte-Tauri project requires a completely different approach in terms of project/logical structure than the one the official Svelte tutorial teaches. For someone experienced this might be very obvious, but for a new user the way it is written now is everything but intuitive. |
SvelteKit is frequently requested and so we decided to make a [poll](https://discord.com/channels/616186924390023171/1232318266542915617/1239666162032181369 ) closes #682 ref: #340
We decided to replace Svelte with SvelteKit in #708 |
SvelteKit is frequently requested and so we decided to make a [poll](https://discord.com/channels/616186924390023171/1232318266542915617/1239666162032181369 ) closes #682 ref: #340
Sveltekit is the current de-facto standard for building svelte front-end applications. Even the project's homepage instructs to use
npm create svelte@latest myapp
which sets up a sveltekit project.I would recommend to replace the svelte template with sveltekit, to bring all the additional benefits compared to bare svelte: built-in router, form handling, api routes and much much more.
The text was updated successfully, but these errors were encountered: