Installation

Install SER in SvelteKit with svelte-plugin-composer.

SER only needs one package, but we recommend installing both of these:

  • svelte-effect-runtime
  • svelte-plugin-composer

Install both, then wire effect() through composer in vite.config.ts .

Requirements

SER relies on these peer dependencies, which your SvelteKit app provides:

PackageSupported versions
svelte^5.44.0
@sveltejs/kit^2.69.0 or ^3.0.0
effect^4.0.0
@sveltejs/vite-plugin-svelte^6.0.0 or ^7.0.0
vite^7.0.0 or ^8.0.0

Installing

Install the packages with your package manager.

deno add npm:svelte-effect-runtime
deno add npm:svelte-plugin-composer

Configure Vite

Update your vite.config.ts with the following code:

vite.config.ts
import { defineConfig } from "vite";
import { sveltekit } from "@sveltejs/kit/vite";
import { effect } from "svelte-effect-runtime";
import { compose } from "svelte-plugin-composer";

export default defineConfig({
plugins: compose([
		effect(),
		sveltekit({
			compilerOptions: {
				experimental: {
					async: true,
				},
				runes: ({ filename }) =>
					filename.split(/[/\\]/).includes("node_modules") ? undefined : true,
			},
			experimental: {
				remoteFunctions: true,
			},
		}),
]),
});

You should now have added compose(), effect() and enabled both experiments for remote functions and async rendering in Svelte.

On this page