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: Sveltekit templates #200
Conversation
- Remove unused route group - Should fix the CI - Closer to the barebones SK template.
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.
Thank you for your contribution. Please move favicon.png
file to the _assets_
folder and include it in the _cta_manifest_
file
run |
packages/cli/fragments/fragment-svelte-kit-ts/src/routes/+page.svelte
Outdated
Show resolved
Hide resolved
packages/cli/fragments/fragment-svelte-kit/src/routes/+page.svelte
Outdated
Show resolved
Hide resolved
@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. |
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.
Thank you
@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: