Description
I am using React 19, Express, and Streaming SSR (renderToPipeableStream) along with @loadable/server ChunkExtractor to extract and inject script/style tags for client-side hydration.
The loadable-stats.json is generated correctly, and ChunkExtractor.getScriptTags() returns the expected <script> tags.
However, when I inject these <script> tags inside the onAllReady() callback of renderToPipeableStream, they never appear in the final browser HTML output. This results in no client bundle being loaded and therefore hydration never occurs.
This issue happens even though:
Scripts are extracted correctly
onAllReady() is called
res.write(scripts) is executed
SSR output is streamed successfully
React version: 19.2.0
Steps To Reproduce
https://github.com/sandeep3690Butte/node-r19-ssr
1.git clone
2.yarn install
3.yarn build
4.yarn start
5.Open the SSR page → scripts do not appear in view-source or DevTools Network panel.
Repository Structure
client/ → all client React code
server/ → Express SSR server
webpack.* → server/client configs for dev + prod
The current behavior
The onAllReady() callback is triggered correctly
res.write() executes with no error
But no script tags appear in the final HTML
Client JS never loads, causing hydration to never run
No errors in server logs or browser console
The expected behavior
The <script> tags returned by ChunkExtractor.getScriptTags() should be written to the response in onAllReady() so they load the client bundles required for hydration.