Default value: false. (Or true if using a Vike extension that requires streaming.)
Requires: ssr: true.

Provided by: vike-react/vike-vue/vike-solid

You need to install vike-react/vike-vue/vike-solid to be able to use the stream setting. If you don't use vike-react/vike-vue/vike-solid then see Without vike-{react,vue,solid}.

The stream setting allows you to:

What is HTML Streaming? If you're unfamiliar with HTML streaming then check out this explanation of SSR, HTML streaming, and Progressive Rendering. Although it explains it in the context of React, we also recommend reading it if you use a UI framework other than React.

// /pages/+config.ts
 
import type { Config } from 'vike/types'
 
export default {
  // Enable HTML Streaming. Let Vike extensions decide whether to use a Node.js or Web stream.
  stream: true,
  // Enable HTML Streaming. Force the stream to be a Web Stream.
  stream: 'web',
  // Enable HTML Streaming. Force the stream to be a Node.js Stream.
  stream: 'node'
} satisfies Config

Inheritance

Enable for all your pages:

// /pages/+config.ts
 
import type { Config } from 'vike/types'
 
// This config applies to all pages (/pages/**).
export default {
  stream: false
} satisfies Config

Enable only for some pages:

// /pages/admin/+config.ts
 
import type { Config } from 'vike/types'
 
/* This config applies only to admin pages (/pages/admin/**) such as:
   FILESYSTEM                            URL
   /pages/admin/+Page.ts                 /admin
   /pages/admin/user/@id/+Page.ts        /admin/user/@id
   /pages/admin/product/@id/+Page.ts     /admin/product/@id
*/
export default {
  stream: false
} satisfies Config

For an improved file and config organization, you can consider using a domain-driven file structure.

Without vike-{react,vue,solid}

In case you don't use a UI framework Vike extension vike-react/vike-vue/vike-solid, you can:

See also