Skip to content

[Flight] Fix webpack plugin skipping chunks with a non-JS asset listed first - #38455

Open
lazerg wants to merge 1 commit into
react:mainfrom
lazerg:fix/issue-38453-flight-webpack-chunks
Open

lazerg wants to merge 1 commit into
react:mainfrom
lazerg:fix/issue-38453-flight-webpack-chunks

Conversation

@lazerg

@lazerg lazerg commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Summary

In ReactFlightWebpackPlugin, the loop over c.files used return for non-JS and .hot-update.* files. That exits the whole chunk callback, so a chunk whose first file is e.g. extracted CSS never gets its JS file recorded and the manifest ends up with chunks: []. Using continue skips just that file and moves on to the next one.

Fixes #38453

How did you test this change?

Didn't run the issue's repro script locally. The change only swaps return for continue in the two guards, as suggested in the issue, so a chunk listing ['client0.css', 'client0.js'] now records client0.js.

@meta-cla meta-cla Bot added the CLA Signed label Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Comparing: edae846...18523cc

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 7.35 kB 7.35 kB = 1.96 kB 1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 628.58 kB 628.58 kB = 110.98 kB 110.98 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 7.36 kB 7.36 kB = 1.96 kB 1.96 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 699.69 kB 699.69 kB = 122.41 kB 122.41 kB
facebook-www/ReactDOM-prod.classic.js = 717.77 kB 717.77 kB = 125.46 kB 125.46 kB
facebook-www/ReactDOM-prod.modern.js = 708.11 kB 708.11 kB = 123.88 kB 123.88 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by sizebot against 18523cc

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[react-server-dom-webpack] Flight client manifest lists empty chunks when a non-JavaScript asset appears first in a chunk

1 participant