vikejs / vike-react

🔨 React integration for Vike
https://vike.dev/vike-react
MIT License
94 stars 15 forks source link

Disable HTML streaming #106

Closed Dubzer closed 4 months ago

Dubzer commented 4 months ago

hi! I wanted to disable HTML streaming while using vike-react-query, since I would like to keep partial availability of the website for users with JS disabled. but unfortunately, after passing stream: false to the +config.ts, I got the following error:

[vike][request(1)] Following error was thrown by the onRenderHtml() hook defined at /node_modules/vike-react/dist/renderer/onRenderHtml.js
Error: [react-streaming@0.3.26][Wrong Usage] HTML Streaming is disabled: set the option https://vike.dev/stream to true

if I remove stream: false from the config, and then set my user-agent to Google's bot, it automatically disables the HTML streaming, and in that case there's no error.

Tested on the vike-react-query example from the repo

brillout commented 4 months ago

This indeed seems contradictory, let me have a look.

brillout commented 4 months ago

Fix is released.