Skip to content

[Flight] Use about: protocol instead of rsc: protocol for fake evals #33977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

sebmarkbage
Copy link
Collaborator

Chrome DevTools Extensions has a silly problem where they block access to load Resources from all protocols except an allow list.

https://issues.chromium.org/issues/416196401

Even though these are eval() and not actually loaded from the network they're blocked. They can really be any string. We just have to pick one of:

'http:', 'https:', 'file:', 'data:', 'chrome-extension:', 'about:'

That way React DevTools extensions can load this content to source map them.

Webpack has the same issue with its webpack:// and webpack-internal:// urls.

@sebmarkbage sebmarkbage requested a review from eps1lon July 24, 2025 01:42
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 24, 2025
@react-sizebot
Copy link

Comparing: edac0dd...02f9e3c

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 = 6.68 kB 6.68 kB +0.11% 1.82 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.70 kB 530.70 kB = 93.70 kB 93.70 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 655.25 kB 655.25 kB = 115.40 kB 115.40 kB
facebook-www/ReactDOM-prod.classic.js = 675.13 kB 675.13 kB = 118.75 kB 118.75 kB
facebook-www/ReactDOM-prod.modern.js = 665.56 kB 665.56 kB = 117.11 kB 117.11 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 02f9e3c

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty silly that this works 😄 Got punished for doing the right thing.

@sebmarkbage sebmarkbage merged commit 3d14fcf into facebook:main Jul 24, 2025
247 checks passed
@sebmarkbage
Copy link
Collaborator Author

One downside of this is that Firefox doesn't group the files for about: in the Firefox Debugger. It does for other protocols. Unfortunately, Chrome does the opposite for data: so we can't use that one neither since it instead gets in the way there. We favor the Chrome DevTools experience since that's the most common and Firefox is still lacking many features that we rely on elsewhere so it's inherently worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants