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.
- 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
- 01Production CSS inlining1st-party2 pts
1st-party, like 7 of the other 22 frameworks. None scores higher.
Show the how-toHide 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 underinlineStylesUpToBytes(20 KB by default). Component styles registered withuseStylesScoped$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-toHide 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-sansandfontaine, 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), }), ], - 03Image pipeline1st-party2 pts
1st-party, like 8 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
built-in
?jsximport suffix (theqwikCity()Vite plugin bundlesvite-imagetools; the docs call it "a built-in feature ... no additional packages or components need to be installed"):<img>withsrcset(200-1200w webp),loading=lazy,decoding=async, width/height. Localsrcimages only per docs;@unpic/qwikis third-party (per the docs) andqwik-imageis a separate CDN-loader component whose repo now sits in the QwikDev org. (image-optimization)Code example
Add
?jsxto a local image import to get a component. It renders an<img>with a webpsrcset(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>
ManualServing a different crop or format per screen size. Not scored: the label shows how much the framework does for you.
?jsxemits<img>/srcsetas webp (format overridable); the docs mention no<picture>orsizes, so no first-party<picture>documented. (image-optimization)Example
The
?jsximage import only emits an<img>, so write<picture>in JSX yourself, with files served frompublic/. Qwik uses HTML attribute names such assrcset.// 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-toHide the how-to
cacheControl({ staleWhileRevalidate, maxAge, sMaxAge, public })inonGetper layout/route. SSG via the static adapter; no data cache and no ISR documented. (caching, static-site-generation)Code example
Call
cacheControlin a layout's or route'sonGetto set theCache-Controlheader 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-toHide 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. Setprefetch={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-toHide 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 thestreaming.inOrderrender 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
- 07Early Hints / preload headersManual0 pts
Manual, like 15 of the other 22 frameworks. 7 frameworks score higher.
Show the how-toHide the how-to
No first-party preload
Linkheaders or 103 Early Hints documented; the preloader works through<link rel="modulepreload">tags in the HTML. Set aLinkheader by hand withheaders.set()in a request handler. (speculative-module-fetching, caching)Code example
Set a
Linkheader in the root layout'sonGethandler. 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') }
Other features
- 08Islands / partial hydration / lazy slices1st-party2 pts
1st-party, like 14 of the other 22 frameworks. None scores higher.
Show the how-toHide 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 withclient: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 aclient:*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
- 09Per-route render modes1st-party2 pts
1st-party, like 18 of the other 22 frameworks. None scores higher.
Show the how-toHide 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 hasssginclude/exclude. (static-site-generation, cloudflare-pages)Code example
A dynamic route that exports
onStaticGenerateis prerendered for the params it returns. On Cloudflare Pages, the adapter'sssg.includeandssg.excludechoose 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
- 10Fine-grained client reactivity1st-party2 pts
1st-party, like 21 of the other 22 frameworks. None scores higher.
Show the how-toHide 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
useSignalanduseStoreare 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
- 11Built-in bundle analysisThird-party1 pt
Third-party, like 18 of the other 22 frameworks. 2 frameworks score higher.
Show the how-toHide the how-to
No visualizer/analyzer documented. First-party knobs:
qwikViteentryStrategyandqsymbol-event analytics. The Insights lab is prototyping-stage. (bundle, insights)Code example
Qwik has no analyzer of its own. Add
rollup-plugin-visualizerto the base Vite config;vite buildthen 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
- 12Third-party script strategies1st-party2 pts
1st-party, like 4 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
qwik add partytown(CLI integration shipped in@builder.io/qwik; it installs@qwik.dev/partytown, published from the QwikDev/partytown repo): renderQwikPartytownwithforward=[...], mark scriptstype="text/partytown". The docs page itself names no npm package. (partytown)Code example
qwik add partytowncreates aQwikPartytowncomponent. Render it in the head with the globals to forward, and mark scriptstype="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
- 13Portable multi-host deployment1st-party2 pts
1st-party, like 7 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
qwik addadapters: 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(orvercel-edge,netlify-edge,cloudflare-pages) writes an adapter config that extends the base Vite config. The Books port keeps one per host underadapters/.// 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
- 14Service worker / offline supportExperimental1 pt
Experimental: the only framework of 23 with this label. 2 frameworks score higher.
Show the how-toHide the how-to
@qwikdev/pwa(0.0.4, published 2024-02-26 from the QwikDev org) adds aqwikPwa()Vite plugin and asetupPwa()call insrc/routes/service-worker.tsthat 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/pwaadds aqwikPwa()Vite plugin and asetupPwa()call in the service worker route. It precaches the builtq-*.jsfiles, images andpublic/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.
- App
- qwik-books
- Repository
- github.com/MaxwellCohen/qwik-books
Branch
main
vibe port
- Vercel
- qwik-books.vercel.app
- Netlify
- qwik-books.netlify.app
- Cloudflare
- qwik-books.to-email-max.workers.dev
Branch
optimized
cache + fonts
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.
| Build | Path | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Hosts |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Book list / | |||||||||||
| baseline | / | 85 | (good)1.61 | 1.04 | (poor)4.15 | (good)0 | (good)0.000 | 2.38 | 4.15 | 170 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | / | 90 | (good)0.94 | 1.64 | (needs improvement)3.55 | (good)0 | (good)0.000 | 2.75 | 3.55 | 167 | 3/3 Vercel, Netlify, Cloudflare |
| Book page /10145787 | |||||||||||
| baseline | /10145787 | 97 | (good)1.51 | 0.63 | (needs improvement)2.56 | (good)0 | (good)0.000 | 1.84 | 2.56 | 149 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | /10145787 | 100 | (good)0.92 | 0.58 | (good)1.86 | (good)0 | (good)0.000 | 1.37 | 1.86 | 107 | 3/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.
| Build | Path | Host | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Runs | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Qwik City | |||||||||||||
| baseline | / | Vercel | 85 | (good)1.66 | 0.35 | (poor)4.20 | (good)0 | (good)0.000 | 1.66 | 4.20 | 185 | 3/3 | OK |
| baseline | / | Netlify | 85 | (good)1.51 | 2.29 | (poor)4.05 | (good)0 | (good)0.000 | 3.81 | 4.05 | 135 | 3/3 | OK |
| baseline | / | Cloudflare | 85 | (good)1.66 | 0.49 | (poor)4.20 | (good)0 | (good)0.000 | 1.66 | 4.20 | 190 | 3/3 | OK |
| baseline | /10145787 | Vercel | 97 | (good)1.51 | 0.24 | (needs improvement)2.56 | (good)0 | (good)0.000 | 1.51 | 2.56 | 141 | 3/3 | OK |
| baseline | /10145787 | Netlify | 97 | (good)1.51 | 0.31 | (needs improvement)2.56 | (good)0 | (good)0.000 | 1.51 | 2.56 | 117 | 3/3 | OK |
| baseline | /10145787 | Cloudflare | 96 | (good)1.51 | 1.35 | (needs improvement)2.56 | (good)0 | (good)0.000 | 2.50 | 2.56 | 189 | 3/3 | OK |
| optimized | / | Vercel | 92 | (good)0.93 | 0.27 | (needs improvement)3.30 | (good)0 | (good)0.000 | 0.93 | 3.30 | 147 | 3/3 | OK |
| optimized | / | Netlify | 89 | (good)0.94 | 2.30 | (needs improvement)3.60 | (good)0 | (good)0.000 | 3.64 | 3.60 | 152 | 3/3 | OK |
| optimized | / | Cloudflare | 88 | (good)0.95 | 2.35 | (needs improvement)3.75 | (good)0 | (good)0.000 | 3.67 | 3.75 | 201 | 3/3 | OK |
| optimized | /10145787 | Vercel | 99 | (good)0.92 | 1.30 | (good)1.97 | (good)0 | (good)0.000 | 2.28 | 1.97 | 145 | 3/3 | OK |
| optimized | /10145787 | Netlify | 100 | (good)0.92 | 0.27 | (good)1.80 | (good)0 | (good)0.000 | 0.92 | 1.80 | 127 | 3/3 | OK |
| optimized | /10145787 | Cloudflare | 100 | (good)0.92 | 0.17 | (good)1.80 | (good)0 | (good)0.000 | 0.92 | 1.80 | 48 | 3/3 | OK |