These posts are aggregated from Svelte GitHub Repository.

  • Hook into Svelte compile pipeline

    I have a rather unusual question. I try to build a "plugin" for Svelte, where I want to hook into the compile pipeline of Svelte. My use case is that I want to transform a bit o
  • Svelte 5 Optional snippets in components

    Hi, I have a question about snippets that come with Svelte 5. Is there a way to make snippets optional? I succeeded in making this work with the following solution, but I encounter
  • Testing .svelte.ts/js files

    When using a $state in a class like this, how can the file be made testable using frameworks like vitest ? ```js export class Example { value = $state(['todo1']); add(t
  • untrack vs specifying which vars should be tracked in $effect

    Hi, Really sorry if this is a duplicate but quick question. So $effect (()=>{}) runs when any of the used states that are used within the function are changed, unless you add
  • Rename default snippet from `children` to `slot` in Svelte 5

    It would bring 2 benefits: - More obvious that it's a slot. Many frameworks use the "slot" word to describe slot content. - Fewer characters -> less typing.
  • How to use TypeScript with restProps in Svelte 5 without errors?

    `$$restProps` is deprecated in Svelte 5, and the [documentation](https://svelte-5-preview.vercel.app/docs/runes:~:text=If%20you%27re%20using,%3CMyProps%3E()%3B) gives this as the
  • Rerunning ‘load’ method on slug change

    I’m working with SvelteKit and have several pages under path/[id=uuid]/, such as path/[id=uuid]/first, path/[id=uuid]/second, etc. I need to fetch data when accessing anything unde
  • Svelte 5 : Complexity is bad , really bad ... so lets go back to whiteboard.

    When I heard runes changes are coming , I thought it would be cool but... after watching the tutorial [Svelte 5 is a Triumph`](https://www.youtube.com/watch?v=tC9KSwnczxQ&t=216s
  • Should we rename svelte actions?

    Since the release of SvelteKit, there has been some overloading of the term "action" when developing Svelte apps. In SvelteKit, there are form actions: https://kit.svelte.dev/do
Loading Svelte Themes