6,277 questions
0
votes
1
answer
35
views
css gets transitioned at first mount
I have a svelte app that mounts some progress dots into a pretty plain html site.
simplified the ProgressDots.svelte has this:
hello
<div class="progress-dots">
<div class="...
-1
votes
1
answer
19
views
passing children's layout.ts data to parent's layout.svelte
So I have been working on the implementation of breadcrumbs feature in my sveltekit webapp.
The idea is, the breadcrumb will be rendering at the most top layout.svelte.
And then the proceeding ...
0
votes
0
answers
101
views
How to have regular code work with proxies
I have a derived variable from a property of a svelte component:
let {entity = $bindable(), targetType}: { entity: EntityDTO, targetType: EntityType } = $props();
const links = $derived(entity.links?....
0
votes
1
answer
26
views
Declare a snippet inside a component without it being implicitly passed to the component as a prop
The Svelte tutorial demonstrates how to declare a table row snippet:
<tbody>
{#snippet monkey()}...{/snippet}
{@render monkey()}
</tbody>
So far so good. Makes sense to put a ...
0
votes
1
answer
33
views
SvelteKit (adapter‑static) + Tailwind v4 - How do I add a Google font?
(and make it the default sans stack without breaking the zero‑config build?)
I created a new project with the sv create wizard and chose Tailwind CSS.
The scaffold does not generate a tailwind.config....
1
vote
1
answer
35
views
How to invalidate an arbitrary cache?
I have a simple +page.ts showing the data string and providing the "Update" button:
<script lang="ts">
import { invalidateAll } from '$app/navigation';
const { data }...
0
votes
1
answer
39
views
Building Svelte Kit application for deployment on Azure webapps
I have built a Svelte Kit application that utilises a couple of Microsoft Graph endpoints to pull from our internal news SharePoint sites. It works perfectly fine in dev and when I use the preview ...
0
votes
1
answer
40
views
How to delete the user after logout in Sveltekit using runes?
I am trying to get auth working in my sveltekit 2.20.7 / svelte 5.27.0 application
I have an express backend that runs on port 8000 and uses express-session with connect-redis and passport to provide ...
0
votes
0
answers
35
views
why does svelte-kit dev return "Invalid command: dev" error?
I am trying to run a svelte project with the following command
> npm run dev
but I am getting this error
ERROR
Invalid command: dev
Run `$ svelte-kit --help` for more info.
svelte-kit is ...
1
vote
2
answers
82
views
How to check when window becomes available?
I am new to SvelteKit and I am not familiar with SSR. I have recently learned that window is only defined after the client-side has been loaded, which can be determined with the onMount hook.
But here'...
0
votes
0
answers
39
views
Login is possible but my supabase user / session is not "authenticated", GoTrueClient getSession() session from storage null
The stack: SvelteKit / Supabase (with docker)
To authenticate the users i followed the supabase tutorial (so my code strictly follows that). It works as i receive the user's data (profile, session...)....
0
votes
1
answer
47
views
How to properly handle async initialization in Svelte 5 without onMount?
I'm migrating my project from Svelte 4 to Svelte 5, and one major pain point is the removal of the traditional onMount usage for async logic.
In Svelte 4, I used onMount(async () => { ... }) to ...
-1
votes
0
answers
19
views
Svelte 5 snippet argument type check weird behaviour
I've had this problem for a while and haven't really found anyone with a similar issue. The Svelte 5 snippets do not accept primitive types as arguments.
.
I have the script tag marked with lang="...
0
votes
1
answer
28
views
How to solve iife/umd conflict with supabase
I have installed supabase using
npm install @supabase/supabase-js
I am using Svelte and use
nvm use 16.16.0
In my script I have the line
import { createClient } from '@supabase/supabase-js'
I get ...
0
votes
0
answers
32
views
Svelte Routing - Cannot read properties of undefined (reading 'before')
Not able to get routing to work without a bug. The route works if I click on the link twice, the second time, the correct page renders. The first a console output error is generated.
ERROR:
Uncaught ...