@svelte-drama/swr

SSR

Server-side rendering is only supported in conjunction with SvelteKit. To enable SSR, you must add this call to your src/hooks.server.ts file. See SvelteKit documentation for more information about hooks.

import { enableSSR } from "@svelte-drama/swr/server"

enableSSR()

There is no additional configuration or options required.

Limitations

While rendering on the server, a new cache is created within each request to SvelteKit. This is to avoid accidental cache pollution, where the information from multiple different users could be written to a single cache. Information will be deduplicated within a request, but each new request will start with its own empty cache.