Skip to main content
SvelteKit owns routes, load functions, locale resolution, links, document metadata, and SEO. Fimo connects content, labels, source tracking, and an optional Studio preview bridge.

Compatibility

The current adapter targets SvelteKit 2 with Svelte 5. The acceptance fixture uses SvelteKit 2.70.2, Svelte 5.56.8, and Vite 8.2.0. SvelteKit 1 and Svelte 4 are outside the current tested boundary.

Configure the runtime

Install fimo-sveltekit at the same version as fimo. It carries every SvelteKit surface: content, labels, components, the Vite plugin, and the hosting adapter.
Add Fimo’s Vite plugin beside SvelteKit’s plugin:
This tags native Svelte elements during development for Studio source mapping. For Fimo hosting, use the adapter:
It does not replace SvelteKit routing or alter production output.

Content and labels

Use SvelteKit server load functions with the request event:
Pass createFimo the locale your application resolved. If you omit it, Fimo sends i18n.defaultLocale from .fimo/config.json, and when that is unset the API answers with your project default. getLabels follows the same rule: add locale once your application resolves one, and without it the API answers with your project default, which the returned snapshot reports as its locale. Fetch labels in the root server layout and pass the snapshot to FimoProvider. Fimo resolves the injected content API URL internally; do not import a Fimo environment variable or hardcode a tenant URL:
Render tracked values with native components from fimo-sveltekit/components:

Live preview

FimoProvider also owns the optional Studio preview runtime, including script loading, SvelteKit navigation, and content refresh. Application code does not need a Fimo server hook, a separate preview component, a preview environment lookup, or a script tag.

Boundaries

  • SvelteKit owns routing, history, 404s, locale URLs, and SEO.
  • Fimo’s Vite plugin owns development source tagging only.
  • FimoProvider owns labels and the optional Studio preview bridge.
  • Do not add React, React Query, or a Vite SPA fallback to SvelteKit.