You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run rsbuild dev, then curl -sI -H 'Accept-Encoding: gzip' localhost:3000/assets/js/index.js.
Expected
Content-Encoding: gzip (Rsbuild's default, and set explicitly here).
Actual
No encoding. The dev index.js of a minimal app is 1.9 MB instead of 432 kB.
Possible fix
The override (plugin.ts#L253-L255) came from #7348 for #7344. Rsbuild fixed that bug in 2.0.5 (web-infra-dev/rsbuild#7613). With the override removed on 2.2.10, SSR headers are correct. Streamed responses are still buffered until the stream ends, because srvx's sendNodeResponse never calls res.flush(). Rsbuild's gzip middleware added res.flush() in 2.2.10 (web-infra-dev/rsbuild#8533). In my test, calling res.flush?.() after each res.write in the SSR middleware (server-middleware.ts#L151) fixed the buffering. #8137 still keeps the override.
Workaround
Add api.modifyRsbuildConfig({ order: 'post', handler: (c) => { c.server = { ...c.server, compress: true } } }). Streamed responses then arrive in one piece at the end.
Versions
@tanstack/react-start 1.168.59 (start-plugin-core 1.171.48, same on main at 41ebd28), @rsbuild/core 2.2.10, Node 24.16.
Hey team, I noticed packages/start-plugin-core/src/rsbuild/plugin.ts still hardcodes server: { compress: false } in mergeRsbuildConfig. Happy to open a PR removing that override and flushing streamed SSR chunks if you'd like!
Hi, I'd like to pick this up if nobody else is on it (@avinash-git-24, are you still planning a PR?).
Plan: remove the forced compress: false and flush after each write in the SSR middleware so streamed responses aren't held back.
One question: the plugin accepts any @rsbuild/core 2.x, but the header fix landed in 2.0.5 and the gzip flush in 2.2.10. Should I raise the minimum version, or keep the override for older versions?
Activity
avinash-git-24 commentedon Sep 28, 2026
Hey team, I noticed
packages/start-plugin-core/src/rsbuild/plugin.tsstill hardcodesserver: { compress: false }inmergeRsbuildConfig. Happy to open a PR removing that override and flushing streamed SSR chunks if you'd like!jkugsiya commentedon Oct 6, 2026
Hi, I'd like to pick this up if nobody else is on it (@avinash-git-24, are you still planning a PR?).
Plan: remove the forced
compress: falseand flush after each write in the SSR middleware so streamed responses aren't held back.One question: the plugin accepts any @rsbuild/core 2.x, but the header fix landed in 2.0.5 and the gzip flush in 2.2.10. Should I raise the minimum version, or keep the override for older versions?
fix(start-plugin-core): Rsbuild dev honours SPA mode and server.compress
fix(start-plugin-core): keep the app's server.compress on Rsbuild (Ta…