Skip to content

Qwik City

Qwik City scores 23 of 28 points. That is 11 of 14 on the 7 features that affect first paint (the moment the browser first draws content), and 12 of 14 on the 7 other features.

Tied for rank 4 of 23 with SvelteKit23/28 points: 11/14 first-paint, 12/14 other · 82% complete
Version checked
@builder.io/qwik / @builder.io/qwik-city 1.20.4 (npm latest); the cited docs use these v1 imports
Version notes
Qwik v2 (@qwik.dev/core / @qwik.dev/router 2.0.0-rc.5) is a release candidate whose behavior is not verified here.
Performance guide
Bundle Optimization | Guides 📚 Qwik DocumentationNo single performance page; closest official page.
Issues
github.com/QwikDev/qwik/issues

Scorecard

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

Qwik City's labels across 14 features

  • 1st-party10
  • Experimental1
  • Third-party2
  • Manual1
  • of 14

How it compares

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

Tested in our port

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

First-paint levers

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

    Show the how-to

    A global stylesheet under 10KB is inlined automatically in production; larger files load separately. useStyles$ / useStylesScoped$ are lazy-loadable. (styles)

    Code example

    Import the global stylesheet in root.tsx. In production Qwik inlines it when it is under inlineStylesUpToBytes (20 KB by default). Component styles registered with useStylesScoped$ load only with the component.

    // src/root.tsx
    import { component$ } from '@builder.io/qwik'
    import { QwikCityProvider, RouterOutlet } from '@builder.io/qwik-city'
    import { RouterHead } from './components/router-head/router-head'
    
    import './styles/global.css' // inlined in production if < 20 KB (inlineStylesUpToBytes)
    
    export default component$(() => (
      <QwikCityProvider>
        <head><meta charset="utf-8" /><RouterHead /></head>
        <body><RouterOutlet /></body>
      </QwikCityProvider>
    ))
    // src/components/card/card.tsx
    import { component$, useStylesScoped$ } from '@builder.io/qwik'
    import styles from './card.css?inline'
    
    export const Card = component$(() => {
      useStylesScoped$(styles)
      return <div class="card">…</div>
    })

    Source: Qwik: Styling

  • 02Font optimizationThird-party1 pt

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

    Show the how-to

    The cookbook recommends Fontsource, manual @font-face, unicode-range, and Fontaine for fallback metrics; no preload guidance and no first-party font module documented. (fonts)

    Code example

    The Qwik cookbook points to Fontsource for self-hosted files and Fontaine for fallback metrics. Install @fontsource-variable/open-sans and fontaine, import the font in the root layout, and add the Fontaine Vite plugin.

    // src/routes/layout.tsx
    import '@fontsource-variable/open-sans/wght.css'
    // global.css: body { font-family: "Open Sans Variable", sans-serif; }
    // vite.config.ts
    import { FontaineTransform } from 'fontaine'
    // …
    plugins: [
      qwikCity(), qwikVite(),
      FontaineTransform.vite({
        fallbacks: ['Arial'],
        resolvePath: (id) => new URL(`./public${id}`, import.meta.url),
      }),
    ],

    Source: Qwik: Fonts cookbook, Fontsource: Qwik guide

  • 03Image pipeline1st-party2 pts

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

    Show the how-to

    built-in ?jsx import suffix (the qwikCity() Vite plugin bundles vite-imagetools; the docs call it "a built-in feature ... no additional packages or components need to be installed"): <img> with srcset (200-1200w webp), loading=lazy, decoding=async, width/height. Local src images only per docs; @unpic/qwik is third-party (per the docs) and qwik-image is a separate CDN-loader component whose repo now sits in the QwikDev org. (image-optimization)

    Code example

    Add ?jsx to a local image import to get a component. It renders an <img> with a webp srcset (200w to 1200w), loading="lazy", decoding="async", and width/height.

    // src/components/hero/hero.tsx
    import { component$ } from '@builder.io/qwik'
    import HeroImage from '~/media/hero.jpg?quality=80&jsx'
    
    export const Hero = component$(() => (
      <HeroImage alt="Shelves of books" loading="eager" decoding="sync" />
    ))

    Source: Qwik: Image optimization

    Art direction with <picture>

    Manual

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

    ?jsx emits <img>/srcset as webp (format overridable); the docs mention no <picture> or sizes, so no first-party <picture> documented. (image-optimization)

    Example

    The ?jsx image import only emits an <img>, so write <picture> in JSX yourself, with files served from public/. Qwik uses HTML attribute names such as srcset.

    // src/components/hero-image/hero-image.tsx
    import { component$ } from '@builder.io/qwik'
    
    export const HeroImage = component$(() => (
      <picture>
        {/* art direction: a square crop on narrow screens */}
        <source media="(max-width: 640px)" type="image/avif"
                srcset="/media/hero-square-640.avif" width={640} height={640} />
        {/* format fallback: AVIF, then WebP, then the <img> JPEG */}
        <source type="image/avif" sizes="100vw"
                srcset="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" />
        <source type="image/webp" sizes="100vw"
                srcset="/media/hero-1280.webp 1280w, /media/hero-1920.webp 1920w" />
        <img src="/media/hero-1280.jpg" alt="Shelves of books" width={1280} height={720}
             fetchPriority="high" decoding="async" />
      </picture>
    ))

    Source: MDN: the picture element

  • 04Data/HTML caching1st-party2 pts

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

    Show the how-to

    cacheControl({ staleWhileRevalidate, maxAge, sMaxAge, public }) in onGet per layout/route. SSG via the static adapter; no data cache and no ISR documented. (caching, static-site-generation)

    Code example

    Call cacheControl in a layout's or route's onGet to set the Cache-Control header for every page under it. A nested layout can override it.

    // src/routes/layout.tsx
    import type { RequestHandler } from '@builder.io/qwik-city'
    
    export const onGet: RequestHandler = async ({ cacheControl }) => {
      cacheControl({
        public: true,
        maxAge: 5,
        sMaxAge: 10,
        staleWhileRevalidate: 60 * 60 * 24 * 365,
      })
    }

    Source: Qwik: Caching responses

  • 05Route prefetching1st-party2 pts

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

    Show the how-to

    <Link> prefetches on hover by default (prefetch={false} disables). The preloader adds <link rel="modulepreload"> for handlers and dependencies using a bundle graph; works only in preview/production builds. (routing, modules-prefetching, speculative-module-fetching)

    Code example

    <Link> starts prefetching the next page when the user hovers it. Set prefetch={false} to turn that off for one link.

    // src/components/nav/nav.tsx
    import { component$ } from '@builder.io/qwik'
    import { Link } from '@builder.io/qwik-city'
    
    export const Nav = component$(() => (
      <nav>
        <Link href="/books">Books</Link>
        <Link href="/account" prefetch={false}>Account</Link>
      </nav>
    ))

    Source: Qwik: Routing

  • 06Streaming SSR1st-party2 pts

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

    Show the how-to

    Return an async function from routeLoader$ and render it with <Resource>; Qwik streams the HTML up to that point and sends the rest when the function resolves. Streaming is in order, tuned by the streaming.inOrder render options. (streaming-deferred-loaders, qwik-server)

    Code example

    Return an async function from routeLoader$ and render it with <Resource>. The HTML above the resource streams first, and the rest follows when the data resolves.

    // src/routes/books/[id]/index.tsx
    import { Resource, component$ } from '@builder.io/qwik'
    import { routeLoader$ } from '@builder.io/qwik-city'
    
    export const useReviews = routeLoader$(({ params }) => {
      // returning a function defers it: rendering doesn't wait here
      return async () => {
        const res = await fetch(`https://api.example.com/books/${params.id}/reviews`)
        return (await res.json()) as { id: string; text: string }[]
      }
    })
    
    export default component$(() => {
      const reviews = useReviews()
      return (
        <>
          <h1>Reviews</h1>
          <Resource
            value={reviews}
            onPending={() => <p>Loading…</p>}
            onResolved={(list) => <ul>{list.map((r) => <li key={r.id}>{r.text}</li>)}</ul>}
          />
        </>
      )
    })

    Source: Qwik: Streaming deferred loaders

  • Manual, like 15 of the other 22 frameworks. 7 frameworks score higher.

    Show the how-to

    No first-party preload Link headers or 103 Early Hints documented; the preloader works through <link rel="modulepreload"> tags in the HTML. Set a Link header by hand with headers.set() in a request handler. (speculative-module-fetching, caching)

    Code example

    Set a Link header in the root layout's onGet handler. This one preconnects to the font host. To preload a built file with a hashed name, read its URL from the Vite manifest.

    // src/routes/layout.tsx
    import type { RequestHandler } from '@builder.io/qwik-city'
    
    export const onGet: RequestHandler = async ({ headers }) => {
      headers.set('Link', '<https://fonts.gstatic.com>; rel=preconnect; crossorigin')
    }

    Source: Qwik City: caching and response headers

Other features

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

    Show the how-to

    Resumability: no hydration step; state and listeners are serialized in HTML and handler chunks load lazily. The FAQ says Qwik does not use partial hydration (islands). qwikify$ (@builder.io/qwik-react) gives React islands with client:visible/client:idle. (resumable, faq, react)

    Code example

    Qwik components do not hydrate. The click handler below is serialized into the HTML and its code chunk loads on the first click. React components can still run as islands through qwikify$ with a client:* prop.

    // src/components/counter/counter.tsx
    import { component$, useSignal } from '@builder.io/qwik'
    
    export const Counter = component$(() => {
      const count = useSignal(0)
      // no JS runs until the first click; then only this handler loads
      return <button onClick$={() => count.value++}>Increment {count.value}</button>
    })
    // src/integrations/react/slider.tsx
    /** @jsxImportSource react */
    import { qwikify$ } from '@builder.io/qwik-react'
    import { Slider } from '@mui/material'
    
    export const MUISlider = qwikify$(Slider)
    // usage in a Qwik component: <MUISlider client:visible />

    Source: Qwik: Resumable, Qwik: React integration

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

    Show the how-to

    SSG and SSR can be mixed per route; dynamic routes export onStaticGenerate. No per-route options beyond that documented; the Cloudflare Pages adapter has ssg include/exclude. (static-site-generation, cloudflare-pages)

    Code example

    A dynamic route that exports onStaticGenerate is prerendered for the params it returns. On Cloudflare Pages, the adapter's ssg.include and ssg.exclude choose which paths are static; the rest render on request.

    // src/routes/product/[id]/index.tsx
    import { component$ } from '@builder.io/qwik'
    import { useLocation, type StaticGenerateHandler } from '@builder.io/qwik-city'
    
    export default component$(() => <p>Product {useLocation().params.id}</p>)
    
    export const onStaticGenerate: StaticGenerateHandler = async () => {
      return { params: [{ id: '1' }, { id: '2' }] }
    }
    // adapters/cloudflare-pages/vite.config.ts
    plugins: [
      cloudflarePagesAdapter({
        ssg: { include: ['/*'], exclude: ['/shop/*'], origin: 'https://example.com' },
      }),
    ],

    Source: Qwik: Static site generation, Qwik: Cloudflare Pages adapter

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

    Show the how-to

    Signals/stores re-run dependent components; the FAQ says Qwik uses the vDOM "only sometimes" and otherwise updates the DOM directly (non-structural changes). The scope is not detailed. (faq, state)

    Code example

    useSignal and useStore are tracked. Changing a value updates the parts of the DOM that read it.

    // src/components/counter/counter.tsx
    import { component$, useSignal, useStore } from '@builder.io/qwik'
    
    export const Counter = component$(() => {
      const count = useSignal(0)
      const state = useStore({ name: 'Qwik' })
      return (
        <>
          <button onClick$={() => count.value++}>Increment {count.value}</button>
          <input value={state.name} onInput$={(_, el) => (state.name = el.value)} />
        </>
      )
    })

    Source: Qwik: State

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

    Show the how-to

    No visualizer/analyzer documented. First-party knobs: qwikVite entryStrategy and qsymbol-event analytics. The Insights lab is prototyping-stage. (bundle, insights)

    Code example

    Qwik has no analyzer of its own. Add rollup-plugin-visualizer to the base Vite config; vite build then writes a treemap of the client bundles.

    // vite.config.ts
    import { defineConfig } from 'vite'
    import { qwikVite } from '@builder.io/qwik/optimizer'
    import { qwikCity } from '@builder.io/qwik-city/vite'
    import { visualizer } from 'rollup-plugin-visualizer'
    
    export default defineConfig(() => ({
      plugins: [
        qwikCity(),
        qwikVite(),
        visualizer({ filename: 'stats.html', template: 'treemap', gzipSize: true }),
      ],
    }))

    Source: rollup-plugin-visualizer: README, Qwik: Bundle optimization

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

    Show the how-to

    qwik add partytown (CLI integration shipped in @builder.io/qwik; it installs @qwik.dev/partytown, published from the QwikDev/partytown repo): render QwikPartytown with forward=[...], mark scripts type="text/partytown". The docs page itself names no npm package. (partytown)

    Code example

    qwik add partytown creates a QwikPartytown component. Render it in the head with the globals to forward, and mark scripts type="text/partytown" so they run in a web worker.

    // src/root.tsx
    import { QwikPartytown } from './components/partytown/partytown'
    // …
    <head>
      <QwikPartytown forward={['gtag', 'dataLayer.push']} />
      <script async type="text/partytown"
              src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX" />
      <RouterHead />
    </head>

    Source: Qwik: Partytown

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

    Show the how-to

    qwik add adapters: Node (express, fastify), vercel-edge, netlify-edge, cloudflare-pages, cloudflare-workers. Vercel and Netlify are Edge-runtime adapters only; the docs do not label adapters "first-party" (source is the QwikDev/qwik repo). (deployments, node, vercel-edge, netlify-edge, cloudflare-pages, cloudflare-workers)

    Code example

    qwik add express (or vercel-edge, netlify-edge, cloudflare-pages) writes an adapter config that extends the base Vite config. The Books port keeps one per host under adapters/.

    // adapters/express/vite.config.ts
    import { nodeServerAdapter } from '@builder.io/qwik-city/adapters/node-server/vite'
    import { extendConfig } from '@builder.io/qwik-city/vite'
    import baseConfig from '../../vite.config'
    
    export default extendConfig(baseConfig, () => ({
      build: {
        ssr: true,
        rollupOptions: { input: ['src/entry.express.tsx', '@qwik-city-plan'] },
      },
      plugins: [nodeServerAdapter({ name: 'express' })],
    }))

    Source: Qwik: Node middleware deployment

  • Experimental: the only framework of 23 with this label. 2 frameworks score higher.

    Show the how-to

    @qwikdev/pwa (0.0.4, published 2024-02-26 from the QwikDev org) adds a qwikPwa() Vite plugin and a setupPwa() call in src/routes/service-worker.ts that precaches built assets; its README says it is in its early stages, and qwik.dev does not document it. Qwik's own service worker only prefetched bundles and the preloader has replaced it. (QwikDev/pwa, bundle)

    Code example

    @qwikdev/pwa adds a qwikPwa() Vite plugin and a setupPwa() call in the service worker route. It precaches the built q-*.js files, images and public/ assets.

    // vite.config.ts (npm install -D @qwikdev/pwa)
    import { qwikPwa } from '@qwikdev/pwa'
    // …
    plugins: [qwikCity(), qwikVite(), qwikPwa()],
    // src/routes/service-worker.ts
    import { setupServiceWorker } from '@builder.io/qwik-city/service-worker'
    import { setupPwa } from '@qwikdev/pwa/sw'
    
    setupServiceWorker()
    setupPwa()

    Source: QwikDev/pwa README

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.

Qwik City: latest benchmark per build and page
BuildPathPerfFCPRaw FCPLCPTBTCLSSITTIDocHosts
Book list /
baseline/85(good)1.611.04(poor)4.15(good)0(good)0.0002.384.151703/3 Vercel, Netlify, Cloudflare
optimized/90(good)0.941.64(needs improvement)3.55(good)0(good)0.0002.753.551673/3 Vercel, Netlify, Cloudflare
Book page /10145787
baseline/1014578797(good)1.510.63(needs improvement)2.56(good)0(good)0.0001.842.561493/3 Vercel, Netlify, Cloudflare
optimized/10145787100(good)0.920.58(good)1.86(good)0(good)0.0001.371.861073/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.

Qwik City: latest benchmark per build, page and host
BuildPathHostPerfFCPRaw FCPLCPTBTCLSSITTIDocRunsStatus
Qwik City
baseline/Vercel85(good)1.660.35(poor)4.20(good)0(good)0.0001.664.201853/3OK
baseline/Netlify85(good)1.512.29(poor)4.05(good)0(good)0.0003.814.051353/3OK
baseline/Cloudflare85(good)1.660.49(poor)4.20(good)0(good)0.0001.664.201903/3OK
baseline/10145787Vercel97(good)1.510.24(needs improvement)2.56(good)0(good)0.0001.512.561413/3OK
baseline/10145787Netlify97(good)1.510.31(needs improvement)2.56(good)0(good)0.0001.512.561173/3OK
baseline/10145787Cloudflare96(good)1.511.35(needs improvement)2.56(good)0(good)0.0002.502.561893/3OK
optimized/Vercel92(good)0.930.27(needs improvement)3.30(good)0(good)0.0000.933.301473/3OK
optimized/Netlify89(good)0.942.30(needs improvement)3.60(good)0(good)0.0003.643.601523/3OK
optimized/Cloudflare88(good)0.952.35(needs improvement)3.75(good)0(good)0.0003.673.752013/3OK
optimized/10145787Vercel99(good)0.921.30(good)1.97(good)0(good)0.0002.281.971453/3OK
optimized/10145787Netlify100(good)0.920.27(good)1.80(good)0(good)0.0000.921.801273/3OK
optimized/10145787Cloudflare100(good)0.920.17(good)1.80(good)0(good)0.0000.921.80483/3OK