Skip to content

SvelteKit

SvelteKit scores 23 of 28 points. That is 13 of 14 on the 7 features that affect first paint (the moment the browser first draws content), and 10 of 14 on the 7 other features.

Tied for rank 4 of 23 with Qwik City23/28 points: 13/14 first-paint, 10/14 other · 82% complete
Version checked
@sveltejs/kit ^3.0.1 (lockfile 3.0.1; latest 3.4.0), Vite ^8.1.5 (lockfile 8.3.0)
Version notes
optimized branch; Vercel ISR adapter; Unpic + IPX; Fontsource
Performance guide
Performance • SvelteKit Docs
Issues
github.com/sveltejs/kit/issues

Scorecard

All 14 features, in two groups. Each row shows SvelteKit's label, how that label compares across all 23 frameworks, and how to enable the feature. Feature names link to SvelteKit's entry on that feature's page.

SvelteKit's labels across 14 features

  • 1st-party10
  • Experimental0
  • Third-party3
  • Manual1
  • of 14

How it compares

On 10 of 14 features, no framework has a higher-scoring label than SvelteKit. On the other 4, at least one does.

Tested in our port

The svelte-books port passes 11/11 feature tests. Run on 2026-11-26 at MaxwellCohen/svelte-books@bb5025f. How we test labels

First-paint levers

13/14
  • 1st-party, like 7 of the other 22 frameworks. None scores higher.

    Show the how-to

    Set inlineStyleThreshold high enough (e.g. Number.POSITIVE_INFINITY; the docs define it as the max CSS file length in UTF-16 code units) in vite.config.ts. One line, but you have to know it exists.

    sveltekit({
      inlineStyleThreshold: Number.POSITIVE_INFINITY,
    })

    From this repo's svelte-books/vite.config.ts (optimized branch).

  • 02Font optimizationThird-party1 pt

    Third-party, like 18 of the other 22 frameworks. 4 frameworks score higher.

    Show the how-to

    Import @fontsource-variable/geist (Fontsource). SvelteKit has no first-party font module and does not preload fonts by default; the handle hook's resolve(..., { preload }) filter can add font preloads (not used here), so the font is discovered from the inlined stylesheet.

    @import "@fontsource-variable/geist";

    From this repo's svelte-books/src/routes/layout.css (optimized branch).

  • 03Image pipeline1st-party2 pts

    1st-party, like 8 of the other 22 frameworks. None scores higher.

    Show the how-to

    The framework offers @sveltejs/enhanced-img, a build-time plugin that only optimizes image files present at build. For remote images such as this port's covers the same page points to a CDN and names the community @unpic/svelte, so this port uses Unpic transforms plus an ipx handler (src/lib/server/ipx-handler.ts), disabled on Cloudflare. adapter-vercel also has an images option (not used here). To use the first-party route for local files:

    enhancedImages(), // must come before the SvelteKit plugin
    <enhanced:img src="./path/to/your/image.jpg" alt="An alt text" />

    Adapted from the images docs.

    Art direction with <picture>

    1st-party

    Serving a different crop or format per screen size. Not scored: the label shows how much the framework does for you.

    enhanced:img (local files only) is replaced at build time by an <img> wrapped in a <picture> with multiple formats and sizes; that is modern formats, not breakpoint art direction. Setup is the plugin line shown in section 3:

    <enhanced:img src="./path/to/your/image.jpg" alt="An alt text" />

    From the images docs.

  • 04Data/HTML caching1st-party2 pts

    1st-party, like 16 of the other 22 frameworks. None scores higher.

    Show the how-to

    Use adapter-vercel's per-route isr option, exported as config from a route, as done in src/lib/server/page-isr.ts. SvelteKit also has first-party, host-independent pieces: setHeaders in load for cache-control (this port sets it in src/routes/+layout.server.ts) and per-route prerender. The experimental remote functions only dedupe a query within one request (and share it on the client while it is in use); their prerender variant stores build-time data. This port turns on the remoteFunctions flag but defines no remote functions. A cross-request data cache on other hosts is manual: src/lib/server/catalog-cache.ts with Vercel Cache, Netlify Blobs, and the Workers KV/Cache API paths.

    export const catalogIsrConfig = {
      isr: { expiration: CATALOG_CACHE_REVALIDATE_SECONDS, allowQuery: ['page', 'search'] }
    } satisfies Config;
    // src/routes/+page.server.ts
    export const config = catalogIsrConfig;

    From this repo's svelte-books/src/lib/server/page-isr.ts and src/routes/+page.server.ts (optimized branch; allowQuery shortened and spread removed).

  • 05Route prefetching1st-party2 pts

    1st-party, like 18 of the other 22 frameworks. None scores higher.

    Show the how-to

    Set data-sveltekit-preload-data="hover". This repo's FastLink wrapper maps a preload prop to that attribute per link ('hover' or 'off'); the pagination and sidebar links pass it explicitly and book cards pass preload={eagerPrefetch}. The starter template already sets the attribute on <body>, and JS/CSS are preloaded automatically (performance).

    <body data-sveltekit-preload-data="hover">

    From this repo's svelte-books/src/app.html (optimized branch; class attribute omitted).

  • 06Streaming SSR1st-party2 pts

    1st-party, like 17 of the other 22 frameworks. None scores higher.

    Show the how-to

    Return a promise from a server load without awaiting it (streaming with promises). The page renders with the awaited data, and each promise is streamed to the browser when it resolves; {#await} shows the placeholder.

    export async function load({ params }) {
      return {
        comments: loadComments(params.slug),
        post: await loadPost(params.slug)
      };
    }

    From the SvelteKit load docs (comments omitted).

  • 1st-party, like 3 of the other 22 frameworks. None scores higher.

    Show the how-to

    Set output.linkHeaderPreload: true (SvelteKit 3.0+, default false). Pages that are not prerendered then preload their JS and CSS through the HTTP Link header instead of <link> elements. SvelteKit does not document sending a 103 itself.

    sveltekit({
      output: {
        linkHeaderPreload: true,
      },
    })

    Adapted from the output config docs; the option sits next to inlineStyleThreshold in this repo's svelte-books/vite.config.ts, which does not set it.

Other features

10/14
  • Manual, like 2 of the other 22 frameworks. 20 frameworks score higher.

    Show the how-to

    No first-party islands are documented; all interactive components hydrate, though disabling hydration for a whole route is possible (page options):

    export const csr = false;

    From the page options docs.

  • 1st-party, like 18 of the other 22 frameworks. None scores higher.

    Show the how-to

    Export prerender, ssr, and csr per route (page options).

    export const prerender = true;
    export const ssr = false;
    export const csr = false;

    From the page options docs (each is a separate option; combine as needed).

  • 1st-party, like 21 of the other 22 frameworks. None scores higher.

    Show the how-to

    Runes ($state, $derived, $effect). Dependencies are picked up at runtime from whatever a $derived or $effect reads, not by compile-time analysis, and $state proxies trigger granular updates. Nothing to enable.

    let isOpen = $state(false);

    From this repo's svelte-books/src/lib/features/book/components/MobileBookSidebar.svelte (optimized branch).

  • Third-party, like 18 of the other 22 frameworks. 2 frameworks score higher.

    Show the how-to

    No built-in analyzer; the performance docs suggest rollup-plugin-visualizer in vite.config.ts. Not configured in this port. No config snippet for it was found in the docs.

    Code example

    Add rollup-plugin-visualizer after sveltekit() in the Vite config. vite build then writes a treemap of the bundle to stats.html.

    // vite.config.ts
    import { sveltekit } from '@sveltejs/kit/vite';
    import tailwindcss from '@tailwindcss/vite';
    import { visualizer } from 'rollup-plugin-visualizer';
    import { defineConfig } from 'vite';
    
    export default defineConfig({
    	plugins: [
    		tailwindcss(),
    		sveltekit({ /* … */ }),
    		visualizer({ filename: 'stats.html', gzipSize: true })
    	]
    });

    Source: SvelteKit: Performance

  • Third-party: the only framework of 23 with this label. 5 frameworks score higher.

    Show the how-to

    No first-party script primitive is documented; the performance docs point to Partytown's SvelteKit integration (community package @qwik.dev/partytown) for running third-party scripts in a web worker. Otherwise add the tag in app.html or a component and manage ordering yourself. Not configured in this port.

    Code example

    Install @qwik.dev/partytown, add its Vite plugin, and print the Partytown snippet in the root layout. Scripts tagged type="text/partytown" then run in a web worker instead of the main thread.

    // vite.config.js
    import { sveltekit } from '@sveltejs/kit/vite';
    import { partytownVite } from '@qwik.dev/partytown/utils';
    
    export default { plugins: [sveltekit(), partytownVite()] };
    <!-- src/routes/+layout.svelte -->
    <script>
    	import { partytownSnippet } from '@qwik.dev/partytown/integration';
    </script>
    
    <svelte:head>
    	<script>
    		// Forward the necessary functions to the web worker layer
    		partytown = { forward: ['dataLayer.push'] };
    	</script>
    	{@html '<script>' + partytownSnippet() + '</script>'}
    	<script type="text/partytown" src="https://www.googletagmanager.com/gtag/js?id=YOUR-ID-HERE"></script>
    </svelte:head>

    Source: Partytown: SvelteKit

  • 1st-party, like 7 of the other 22 frameworks. None scores higher.

    Show the how-to

    Pick an adapter for Node, Vercel, Netlify, Cloudflare, or static output.

    const adapter = isCloudflare
      ? cloudflareAdapter
      : process.env.NETLIFY
        ? netlifyAdapter
        : vercelAdapter;
    // ...
    sveltekit({ adapter: adapter() })

    From this repo's svelte-books/vite.config.ts (optimized branch; other options omitted).

  • 1st-party, like 1 of the other 22 frameworks. None scores higher.

    Show the how-to

    Create src/service-worker.js (or src/service-worker/index.ts). SvelteKit bundles it and registers it automatically, and the $service-worker module gives it the built files, the static files, and a version string.

    import { build, files, version } from '$service-worker';
    
    const CACHE = `cache-${version}`;
    const ASSETS = [...build, ...files];

    Adapted from the SvelteKit service workers docs (the install, activate, and fetch handlers that use these are omitted).

1st-party scores 2 points, Experimental and Third-party 1, Manual 0. How scoring works

The port

The books demo app built with this framework, and where each branch is deployed.

Latest benchmark

Mobile Lighthouse lab results from PageSpeed Insights on : the median of 3 runs per host, averaged across the hosts listed. The benchmark page explains each metric and has every other framework.

SvelteKit: latest benchmark per build and page
BuildPathPerfFCPRaw FCPLCPTBTCLSSITTIDocHosts
Book list /
baseline/85(good)1.520.61(poor)4.26(good)14(good)0.0001.884.261733/3 Vercel, Netlify, Cloudflare
optimized/89(good)0.941.26(needs improvement)3.32(good)4(good)0.0002.953.431053/3 Vercel, Netlify, Cloudflare
Book page /10145787
baseline/1014578797(good)1.510.61(needs improvement)2.56(good)20(good)0.0001.832.561283/3 Vercel, Netlify, Cloudflare
optimized/1014578799(good)0.870.68(good)2.19(good)7(good)0.0001.492.221953/3 Vercel, Netlify, Cloudflare
  • Good
  • Needs improvement
  • Poor

FCP 1.8 s / 3 s · LCP 2.5 s / 4 s · TBT 200 ms / 600 ms · CLS 0.1 / 0.25

Per host

The medians above before averaging. Runs is how many measured runs went into each median. Host names link to the deployment.

SvelteKit: latest benchmark per build, page and host
BuildPathHostPerfFCPRaw FCPLCPTBTCLSSITTIDocRunsStatus
SvelteKit
baseline/Vercel85(good)1.540.23(poor)4.21(good)25(good)0.0001.544.21843/3OK
baseline/Netlify85(good)1.510.28(poor)4.21(good)16(good)0.0011.514.211463/3OK
baseline/Cloudflare84(good)1.511.31(poor)4.36(good)1(good)0.0002.594.362883/3OK
baseline/10145787Vercel97(good)1.510.23(needs improvement)2.56(good)17(good)0.0001.512.56873/3OK
baseline/10145787Netlify96(good)1.511.33(needs improvement)2.56(good)3(good)0.0002.482.561743/3OK
baseline/10145787Cloudflare97(good)1.510.28(needs improvement)2.56(good)41(good)0.0001.512.561243/3OK
optimized/Vercel85(good)0.941.29(poor)4.02(good)9(good)0.0002.984.09783/3OK
optimized/Netlify84(good)0.962.31(needs improvement)3.98(good)2(good)0.0004.894.051713/3OK
optimized/Cloudflare99(good)0.930.16(good)1.95(good)0(good)0.0000.972.15663/3OK
optimized/10145787Vercel99(good)0.920.27(good)2.25(good)9(good)0.0000.932.301283/3OK
optimized/10145787Netlify98(good)0.931.46(good)2.23(good)7(good)0.0002.772.233003/3OK
optimized/10145787Cloudflare99(good)0.770.30(good)2.10(good)4(good)0.0000.782.131573/3OK