# Vike

Vike scores 16 of 28 points on 14 speed features: 10/14 on first-paint levers and 6/14 on other features. Rank 13 of 23. Labels: 6 1st-party, 0 Experimental, 4 Third-party, 4 Manual.

- Version checked: vike 0.4.270 with vike-react 0.6.32, vike-vue 0.9.16 and vike-solid 0.8.8 (npm latest on 2026-11-25) (Vike is pre-1.0. The labels assume one of the three UI extensions is installed. The Books port (vike-books) uses vike-react.)
- Performance guide: [Preloading | Vike](https://vike.dev/preloading)
- Issue tracker: https://github.com/vikejs/vike/issues
- Books demo port: [vike-books](https://github.com/MaxwellCohen/vike-books)

## Summary

| Feature | Group | Label | Points |
| --- | --- | --- | --- |
| [Production CSS inlining](https://framework-compare.vercel.app/features/css-inlining.md) | First-paint levers | Manual | 0 |
| [Font optimization](https://framework-compare.vercel.app/features/font-optimization.md) | First-paint levers | Third-party | 1 |
| [Image pipeline](https://framework-compare.vercel.app/features/image-pipeline.md) | First-paint levers | Third-party | 1 |
| [Data/HTML caching](https://framework-compare.vercel.app/features/caching.md) | First-paint levers | 1st-party | 2 |
| [Route prefetching](https://framework-compare.vercel.app/features/route-prefetching.md) | First-paint levers | 1st-party | 2 |
| [Streaming SSR](https://framework-compare.vercel.app/features/streaming-ssr.md) | First-paint levers | 1st-party | 2 |
| [Early Hints / preload headers](https://framework-compare.vercel.app/features/early-hints.md) | First-paint levers | 1st-party | 2 |
| [Islands / partial hydration / lazy slices](https://framework-compare.vercel.app/features/islands.md) | Other features | Manual | 0 |
| [Per-route render modes](https://framework-compare.vercel.app/features/render-modes.md) | Other features | 1st-party | 2 |
| [Fine-grained client reactivity](https://framework-compare.vercel.app/features/reactivity.md) | Other features | 1st-party | 2 |
| [Built-in bundle analysis](https://framework-compare.vercel.app/features/bundle-analysis.md) | Other features | Third-party | 1 |
| [Third-party script strategies](https://framework-compare.vercel.app/features/third-party-scripts.md) | Other features | Manual | 0 |
| [Portable multi-host deployment](https://framework-compare.vercel.app/features/multi-host-deployment.md) | Other features | Third-party | 1 |
| [Service worker / offline support](https://framework-compare.vercel.app/features/service-worker.md) | Other features | Manual | 0 |

## First-paint levers

### Production CSS inlining

Label: **Manual** (0 of 2 points).

No first-party CSS inlining documented; Vike injects `<link rel="stylesheet">` tags for a page's CSS. `injectFilter()` only moves or drops injected tags. Inline by hand, for example with a Vite `?inline` import. ([preloading](https://vike.dev/preloading))

Example of building it yourself:

Import the critical stylesheet with Vite's `?inline` query and print it in a `<style>` tag from `+Head`. Vike does not inject a `<link>` for a CSS file imported this way.

```tsx
// pages/+Head.tsx
import criticalCss from './critical.css?inline'

export function Head() {
  return <style dangerouslySetInnerHTML={{ __html: criticalCss }} />
}
```

Source: [Vite: Disabling CSS injection into the page](https://vite.dev/guide/features#disabling-css-injection-into-the-page) · [Vike: Preloading](https://vike.dev/preloading)

### Font optimization

Label: **Third-party** (1 of 2 points).

No first-party font module documented. Vike injects `<link rel="preload" as="font">` for font files a page imports, but it does not download, subset or self-host fonts; the third-party route is [Fontsource](https://fontsource.org). ([preloading](https://vike.dev/preloading))

Example of building it yourself:

Install a Fontsource package and import it from `+Layout`. The font files are then local build assets, and Vike adds a `<link rel="preload" as="font">` for them.

```tsx
// pages/+Layout.tsx
import '@fontsource-variable/inter'
import './Layout.css' // body { font-family: "Inter Variable", sans-serif; }

export function Layout({ children }: { children: React.ReactNode }) {
  return <div id="app">{children}</div>
}
```

Source: [Fontsource: Install](https://fontsource.org/docs/getting-started/install) · [Vike: Preloading](https://vike.dev/preloading)

Gotchas:

- Vike preloads every font file the page CSS references (here, all 12 Geist subsets); vike-react doesn't expose `injectFilter`, so narrowing it means writing your own `onRenderHtml`.

### Image pipeline

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the `+image` setting only sets the `og:image` preview. Use a community package such as `@unpic/react` or a host image CDN. ([image](https://vike.dev/image), [static-directory](https://vike.dev/static-directory))

Example of building it yourself:

Use `<Image>` from `@unpic/react`. It builds a `srcset` for the image CDN that serves the URL and sets width, height and lazy loading.

```tsx
// pages/book/@id/+Page.tsx
import { Image } from '@unpic/react'
import { useData } from 'vike-react/useData'

export function Page() {
  const book = useData<{ title: string; coverUrl: string }>()
  return (
    <Image src={book.coverUrl} layout="constrained" width={400} height={600} alt={book.title} priority />
  )
}
```

Source: [Unpic: React](https://unpic.pics/img/react/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([image](https://vike.dev/image))

Vike has no image component, so write `<picture>` in the page. With `@unpic/react`, each `<Source>` gets a `media` query and its own crop, and `<Image>` is the fallback.

```tsx
// pages/book/@id/BookCover.tsx
import { Image, Source } from '@unpic/react'

export function BookCover({ title, coverUrl, wideUrl }: { title: string; coverUrl: string; wideUrl: string }) {
  return (
    <picture>
      {/* art direction: a wide banner crop on large screens */}
      <Source media="(min-width: 768px)" src={wideUrl} layout="constrained" width={1200} height={400} />
      <Image src={coverUrl} alt={title} layout="constrained" width={400} height={600} priority />
    </picture>
  )
}
```

Source: [Unpic: React](https://unpic.pics/img/react/) · [MDN: the picture element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture)

### Data/HTML caching

Label: **1st-party** (2 of 2 points).

`prerender: true` renders pages to static HTML at build time, per page or for the whole app. `+headersResponse` sets response headers such as `Cache-Control` per page; it is marked beta. On Vercel, `vercel: { isr: { expiration: 30 } }` in a page's `+config.js` opts into ISR through `vite-plugin-vercel`. No data cache documented. ([pre-rendering](https://vike.dev/pre-rendering), [headersResponse](https://vike.dev/headersResponse), [vercel](https://vike.dev/vercel))

Example of building it yourself:

`prerender: true` builds pages to HTML. A dynamic page sets `Cache-Control` with `+headersResponse`. On Vercel, a page's `+config` can opt into ISR.

```ts
// pages/+config.ts
export default { prerender: true }

// pages/search/+config.ts
export default { prerender: false }

// pages/search/+headersResponse.ts
export function headersResponse() {
  return { 'Cache-Control': 'public, s-maxage=60, stale-while-revalidate=600' }
}

// pages/book/@id/+config.ts (Vercel only, with vite-plugin-vercel)
export default { vercel: { isr: { expiration: 30 } } }
```

Source: [Vike: Pre-rendering](https://vike.dev/pre-rendering) · [Vike: headersResponse](https://vike.dev/headersResponse) · [Vike: Vercel](https://vike.dev/vercel)

### Route prefetching

Label: **1st-party** (2 of 2 points).

`prefetchStaticAssets: 'hover' | 'viewport' | false`, default `'hover'`, per page, with a per-link `data-prefetch-static-assets` override and a programmatic `prefetch('/url')`. Only static assets are prefetched; page data is not. ([prefetchStaticAssets](https://vike.dev/prefetchStaticAssets), [prefetch](https://vike.dev/prefetch))

Example of building it yourself:

`prefetchStaticAssets` sets when a link's page assets are prefetched. A link can override it with `data-prefetch-static-assets`, and `prefetch()` starts it from code.

```tsx
// pages/+config.ts
export default { prefetchStaticAssets: 'viewport' }

// components/BookLink.tsx
import { prefetch } from 'vike/client/router'

export function BookLink({ id }: { id: string }) {
  return (
    <a href={`/book/${id}`} data-prefetch-static-assets="hover" onFocus={() => prefetch(`/book/${id}`)}>
      Details
    </a>
  )
}
```

Source: [Vike: prefetchStaticAssets](https://vike.dev/prefetchStaticAssets) · [Vike: prefetch()](https://vike.dev/prefetch)

### Streaming SSR

Label: **1st-party** (2 of 2 points).

Set `stream: true` in a `+config.js`, for the whole app or per page; it needs `ssr: true` and one of `vike-react`, `vike-vue` or `vike-solid`. The default is `false`. The deferred parts are the UI framework's own async boundaries: `vike-react` streams through `react-streaming`, and `vike-react-query`'s `useSuspenseQuery()` shows a `<Suspense>` fallback while the rest of the page renders. ([stream](https://vike.dev/stream), [streaming](https://vike.dev/streaming), [vike-react-query](https://github.com/vikejs/vike-react/tree/main/packages/vike-react-query))

Example of building it yourself:

Set `stream: true` in `+config`. With `vike-react-query`, a component that calls `useSuspenseQuery()` streams in later, and `withFallback()` gives it a loading fallback.

```tsx
// pages/+config.ts
import vikeReact from 'vike-react/config'
import vikeReactQuery from 'vike-react-query/config'

export default { extends: [vikeReact, vikeReactQuery], stream: true }

// pages/book/@id/Reviews.tsx
import { useSuspenseQuery } from '@tanstack/react-query'
import { withFallback } from 'vike-react-query'

export const Reviews = withFallback(
  ({ id }: { id: string }) => {
    const { data } = useSuspenseQuery({
      queryKey: ['reviews', id],
      queryFn: () => fetch(`/api/reviews/${id}`).then((r) => r.json()),
    })
    return <ul>{data.map((r: { id: string; text: string }) => <li key={r.id}>{r.text}</li>)}</ul>
  },
  () => <p>Loading reviews…</p>,
)
```

Source: [Vike: stream](https://vike.dev/stream) · [vike-react-query README](https://github.com/vikejs/vike-react/tree/main/packages/vike-react-query)

### Early Hints / preload headers

Label: **1st-party** (2 of 2 points).

Vike builds the list of a page's assets as `pageContext.httpResponse.earlyHints` (each entry has an `earlyHintLink` value), so the app does not list assets by hand. The server sends the 103 with its runtime's API, e.g. `res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) })` on Node 18+. Not marked experimental or beta. ([preloading](https://vike.dev/preloading))

Example of building it yourself:

`renderPage()` returns the page's assets in `pageContext.httpResponse.earlyHints`. Pass their `earlyHintLink` values to the runtime's 103 API before sending the body.

```ts
// server.ts
import { renderPage } from 'vike/server'

app.get('*', async (req, res) => {
  const pageContext = await renderPage({ urlOriginal: req.originalUrl })
  const { earlyHints } = pageContext.httpResponse
  // For example with Node.js 18:
  res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) })
  // … then send pageContext.httpResponse as usual
})
```

Source: [Vike: Preloading](https://vike.dev/preloading)

## Other features

### Islands / partial hydration / lazy slices

Label: **Manual** (0 of 2 points).

No islands or partial hydration documented. `<ClientOnly>` renders a component in the browser only, which is client-only rendering. The React Server Components extension `vike-react-rsc` is listed as work in progress (npm 0.0.0) and is not credited. ([ClientOnly](https://vike.dev/ClientOnly), [extensions](https://vike.dev/extensions))

Example of building it yourself:

Make the page HTML-only so it ships no page JavaScript. Then `+client.tsx`, the page's only browser code, hydrates each marked component by hand.

```tsx
// renderer/+config.ts
export default {
  meta: { Page: { env: { server: true, client: false } } }, // HTML-only
}

// pages/about/+Page.tsx (server only)
<div data-island="like" data-props={JSON.stringify({ bookId })}>
  <LikeButton bookId={bookId} />
</div>

// pages/about/+client.tsx
import { hydrateRoot } from 'react-dom/client'
import { LikeButton } from '../../components/LikeButton'

for (const el of document.querySelectorAll<HTMLElement>('[data-island="like"]')) {
  hydrateRoot(el, <LikeButton {...JSON.parse(el.dataset.props!)} />)
}
```

Source: [Vike: Render Modes](https://vike.dev/render-modes) · [Vike: +client.js](https://vike.dev/client)

### Per-route render modes

Label: **1st-party** (2 of 2 points).

Per-page `ssr: false` (SPA) and `prerender: true | false` (SSG) in `+config.js`, inherited by every page under that directory; `stream` is per page too. ([ssr](https://vike.dev/ssr), [pre-rendering](https://vike.dev/pre-rendering), [stream](https://vike.dev/stream))

Example of building it yourself:

Put `ssr` and `prerender` in a directory's `+config`. The setting applies to every page under that directory.

```ts
// pages/+config.ts (all pages: SSR, pre-rendered)
export default { prerender: true }

// pages/admin/+config.ts (admin pages: SPA, not pre-rendered)
export default { ssr: false, prerender: false }

// pages/search/+config.ts (search: SSR on each request, streamed)
export default { prerender: false, stream: true }
```

Source: [Vike: ssr](https://vike.dev/ssr) · [Vike: Pre-rendering](https://vike.dev/pre-rendering) · [Vike: stream](https://vike.dev/stream)

### Fine-grained client reactivity

Label: **1st-party** (2 of 2 points).

The Vike-team UI extensions bring the UI framework's own reactivity: Solid signals with `vike-solid`, Vue refs with `vike-vue`, and the first-party [React Compiler](https://react.dev/learn/react-compiler) for `vike-react`, added to the React Vite plugin. ([vike-solid](https://vike.dev/vike-solid), [vike-vue](https://vike.dev/vike-vue), [vike-react](https://vike.dev/vike-react))

Example of building it yourself:

With `vike-react`, add the React Compiler to the Vite config. It memoizes components and values at build time, so a state change re-renders less.

```ts
// vite.config.ts
import { defineConfig } from 'vite'
import vike from 'vike/plugin'
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
import babel from '@rolldown/plugin-babel'

export default defineConfig({
  plugins: [
    vike(),
    react(),
    babel({ presets: [reactCompilerPreset()] }),
  ],
})
```

Source: [React: React Compiler installation](https://react.dev/learn/react-compiler/installation) · [Vike: vike-react](https://vike.dev/vike-react)

### Built-in bundle analysis

Label: **Third-party** (1 of 2 points).

No first-party analyzer documented; Vike is a Vite plugin, so the third-party route is a community visualizer such as [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer). ([settings](https://vike.dev/settings))

Example of building it yourself:

Add `rollup-plugin-visualizer` next to the Vike plugin. `vike build` then writes a treemap of the bundle to `stats.html`.

```ts
// vite.config.ts
import vike from 'vike/plugin'
import react from '@vitejs/plugin-react'
import { visualizer } from 'rollup-plugin-visualizer'

export default {
  plugins: [vike(), react(), visualizer({ filename: 'stats.html', gzipSize: true })],
}
```

Source: [rollup-plugin-visualizer README](https://github.com/btd/rollup-plugin-visualizer)

### Third-party script strategies

Label: **Manual** (0 of 2 points).

No first-party script-loading strategy documented; `+Head` and `+client.js` are where scripts are added by hand. ([head-tags](https://vike.dev/head-tags))

Example of building it yourself:

Put scripts that should load early in `+Head` with `async`. Load the rest from `+client.ts` once the page has loaded and the browser is idle.

```tsx
// pages/+Head.tsx
export function Head() {
  return <script async src="https://example.com/critical.js" />
}

// pages/+client.ts
addEventListener('load', () => {
  requestIdleCallback(() => {
    const s = document.createElement('script')
    s.src = 'https://example-analytics.com/script.js'
    s.async = true
    document.head.append(s)
  })
})
```

Source: [Vike: Head tags](https://vike.dev/head-tags) · [Vike: +client.js](https://vike.dev/client)

### Portable multi-host deployment

Label: **Third-party** (1 of 2 points).

`+server` gives a built-in server for Node, Bun and Deno self-hosting. Cloudflare uses Cloudflare's `@cloudflare/vite-plugin`, Netlify uses Netlify's `@netlify/vite-plugin`, and Vercel uses `vite-plugin-vercel`; none of the three is a `vike` package. ([self-host](https://vike.dev/self-host), [cloudflare](https://vike.dev/cloudflare), [vercel](https://vike.dev/vercel), [netlify](https://vike.dev/netlify))

Example of building it yourself:

`server: true` uses Vike's built-in server on Node, Bun or Deno. For Cloudflare or Vercel, add that host's Vite plugin.

```ts
// pages/+config.ts (self-host: node ./dist/server/index.mjs)
export default { server: true }

// vite.config.ts (Cloudflare)
import vike from 'vike/plugin'
import { cloudflare } from '@cloudflare/vite-plugin'

export default {
  plugins: [cloudflare({ viteEnvironment: { name: 'ssr' } }), vike()],
}

// vite.config.ts (Vercel)
import { vercel } from 'vite-plugin-vercel/vite'

export default { plugins: [vike(), vercel()] }
```

Source: [Vike: +server](https://vike.dev/server) · [Vike: Cloudflare](https://vike.dev/cloudflare) · [Vike: Vercel](https://vike.dev/vercel)

### Service worker / offline support

Label: **Manual** (0 of 2 points).

No service worker support documented in the Vike docs or its extension list. Hand-write the worker, serve it from `public/`, and register it from `+client.js`. ([static-directory](https://vike.dev/static-directory), [extensions](https://vike.dev/extensions))

Example of building it yourself:

Write the worker in `public/sw.js`, which Vite serves at `/sw.js`. Register it from `+client.ts`.

```js
// public/sw.js
const CACHE = 'v1'
self.addEventListener('fetch', (event) => {
  if (event.request.method !== 'GET') return
  event.respondWith(
    caches.match(event.request).then((hit) =>
      hit ?? fetch(event.request).then((res) => {
        caches.open(CACHE).then((c) => c.put(event.request, res.clone()))
        return res
      }),
    ),
  )
})
```

```ts
// pages/+client.ts
if ('serviceWorker' in navigator) {
  addEventListener('load', () => navigator.serviceWorker.register('/sw.js'))
}
```

Source: [Vike: Static directory](https://vike.dev/static-directory) · [MDN: Using Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers)

## Other performance features

- `+precompress` writes `.br` and `.gz` files at build time. ([precompress](https://vike.dev/precompress))
- `+csp` adds a per-request nonce; `csp: { sri: true }` adds Subresource Integrity hashes to injected tags. ([csp](https://vike.dev/csp))

## Deployments of the Books demo

| Branch | Note | Vercel | Netlify | Cloudflare |
| --- | --- | --- | --- | --- |
| `main` | baseline | https://vike-books.vercel.app | https://vike-books.netlify.app | https://vike-books.to-email-max.workers.dev |
| `optimized` | prefetch + cacheControl + Vercel ISR + fonts + data cache | https://vike-books-optimized.vercel.app | https://vike-books-max-optimized.netlify.app | https://vike-books-optimized.to-email-max.workers.dev |

## Benchmark, 2026-11-28

Tool: PageSpeed Insights v5 (Lighthouse lab run), mobile strategy. 3 measured runs per deployment, median reported; cold runs are left out of the median when a warm run exists. Each build's figure is the average of its hosts' medians (vercel, netlify, cloudflare). Pages measured: book list (/) and one book (/10145787). Times are lab values from one run on 2026-11-28. FCP is the Lighthouse estimate for simulated Slow 4G; Raw FCP, where shown, is the first paint in the real, unthrottled load that estimate is built from. Builds in the same FCP band (https://framework-compare.vercel.app/measured.md) are a tie, so read "fastest first" as band order.

| Page | Build | Branch | Hosts | Performance | FCP | Raw FCP | LCP | TBT | CLS |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| book list (/) | baseline | `main` | cloudflare, netlify, vercel | 83 | 1.53 s | 0.30 s | 4.61 s | 2 ms | 0.001 |
| book list (/) | optimized | `optimized` | cloudflare, netlify, vercel | 82 | 0.97 s | 1.63 s | 4.56 s | 9 ms | 0.000 |
| one book (/10145787) | baseline | `main` | cloudflare, netlify, vercel | 95 | 1.51 s | 0.99 s | 2.76 s | 2 ms | 0.000 |
| one book (/10145787) | optimized | `optimized` | cloudflare, netlify, vercel | 95 | 0.91 s | 0.62 s | 2.93 s | 0 ms | 0.000 |

Full run: https://framework-compare.vercel.app/benchmark.md

---

HTML version: https://framework-compare.vercel.app/frameworks/vike · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
