Skip to content

About

Next.js 16.4 on Node.js 26: inline Flight data split into one <script> per chunk (reproduction)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Next.js 16.4 on Node.js 26: inline Flight data split into one <script> per chunk

Node.js 26.0.0 changed Readable#read(): called with no size, it now returns one buffered chunk instead of everything buffered (nodejs/node#60441). Next.js 16.4.x's inline Flight writer (pullFlightData) loops on read() and wraps each result in its own <script>self.__next_f.push(…)</script>. On Node 26, every chunk React buffered therefore becomes its own script and its own response write.

Run

npm install
npm run build                                    # any Node version
node node_modules/next/dist/bin/next start -p 3100   # with Node 24.x
node measure.mjs http://127.0.0.1:3100/ 7        # second terminal
# stop, then start the SAME build with Node 26.x and measure again

measure.mjs requests the page with gzip and prints medians: inline Flight scripts, response chunks, gzip and HTML bytes, and request time.

Result (Linux x64, same build)

inline Flight scripts response chunks gzip bytes median request
next 16.4.5 · Node 24.22.2 3 4 10,771 19.2 ms
next 16.4.5 · Node 26.13.0 407 411 47,301 26.1 ms
next 16.5.0-canary.43 · Node 24.22.2 3 4 10,763 16.3 ms
next 16.5.0-canary.43 · Node 26.13.0 3 5 10,786 17.4 ms

The page renders 200 client components, each with a ~2 KB string prop. React Flight writes long strings as separate chunks, so the RSC stream carries many chunks in one burst.

About

Next.js 16.4 on Node.js 26: inline Flight data split into one <script> per chunk (reproduction)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages