feat: Sveltekit templates - #200
Conversation
- Remove unused route group - Should fix the CI - Closer to the barebones SK template.
amrbashir
left a comment
There was a problem hiding this comment.
Thank you for your contribution. Please move favicon.png file to the _assets_ folder and include it in the _cta_manifest_ file
|
run |
|
@amrbashir Done the edits, the only thing I find strange is splitting them in the CLI options no? (sveltekit at the end of the list) |
|
Templates are always added to the bottom of the list. |
|
@melMass This is great to get SvelteKit in the mix, thank you! However, the template might need a fix. Using For example: Error: This is a known and expected SvelteKit response which happens when SSR is not disabled properly. So... is SvelteKit's SSR disabled properly in the template? Or perhaps this is a problem with @sveltejs/adapter-static? Is this worth creating an issue for, or must we wait for SvelteKit 1.0? Again, thank you! |
|
AFAIK this is expected behavior? So I would just move this in onMount I'm maybe wrong as things moves fast in SK, I contributed this when they announced that there should not be major changes to the API for 1.0 |
|
@melMass I found out that the new way to disable SSR is to add:
This fixes the issue. The issue and solution are described here. It seems to me this should be the default behavior in tauri for the sveltekit template. Do you think I should create a PR for this? |
This was already the case at the time (packages/cli/fragments/fragment-svelte-kit-ts/src/routes/+layout.ts) but maybe they changed the way they are triggered IIRC pre-render induced ssr off. And I use this template in a prod app
But yes of course if you think it should be done differently don't hesitate to PR the edit! |
Turns off SSR by default, which prevents usage of `appWindow`. Discussion: tauri-apps#200 (comment) Issue & solution: https://github.com/sveltejs/kit/tree/master/packages/adapter-static#turn-off-ssr
Turns off SSR by default, which prevents usage of `appWindow`. Discussion: tauri-apps#200 (comment) Issue & solution: https://github.com/sveltejs/kit/tree/master/packages/adapter-static#turn-off-ssr
…eltekit templates #200") (#241) * Update +layout.ts (SvelteKit TS template) Turns off SSR by default, which prevents usage of `appWindow`. Discussion: #200 (comment) Issue & solution: https://github.com/sveltejs/kit/tree/master/packages/adapter-static#turn-off-ssr * Fix: disable SSR by default in SvelteKit template Turns off SSR by default, which prevents usage of `appWindow`. Discussion: #200 (comment) Issue & solution: https://github.com/sveltejs/kit/tree/master/packages/adapter-static#turn-off-ssr * changefile

What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___)Other information
This is a WIP that I will finish either today or tomorrow:
Question for Maintainers (cross asked on Discord)
Answered: