stream
Default value: false
. (Or true
if using a Vike extension that requires streaming.)
Requires: ssr: true
.
Implemented by: vike-react
/vike-vue
/vike-solid
.
You need
vike-react
/vike-vue
/vike-solid
to be able to use thestream
setting. If you don't usevike-react
/vike-vue
/vike-solid
then see Withoutvike-{react,vue,solid}
.
The stream
setting allows you to:
- Enable or disable HTML Streaming.
- Specify the stream type (either a Node.js Stream or a Web Stream).
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.
Inheritance
Enable for all your pages:
Enable only for some pages:
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:
- Integrate HTML streaming yourself, see HTML Streaming.
- Implement the
stream
setting yourself by using meta. Examples:
See also
- HTML Streaming
-
API >
ssr
- Explanation of SSR, HTML streaming, and Progressive Rendering
- Node.js Streams (Node.js documentation)
- Web Streams (MDN documentation)