Skip to content

React usage check: improve bundle detection - #1

Merged
gunjanjaswal merged 1 commit into
gunjanjaswal:add/inlined-react-runtime-checkfrom
jsnajdr:add/react-usage-check
Sep 21, 2026
Merged

gunjanjaswal merged 1 commit into
gunjanjaswal:add/inlined-react-runtime-checkfrom
jsnajdr:add/react-usage-check

Conversation

@jsnajdr

@jsnajdr jsnajdr commented Sep 21, 2026

Copy link
Copy Markdown

Update for PR WordPress#1380 by @gunjanjaswal where I implement a more granular check: detect which exact library, react/jsx-runtime, react or react-dom, is inlined. Different libraries have different consequences and severity. Inlining the React JSX Runtime is not a big issue today, because Gutenberg ships a patched React 19 can work with it, but inlining the actual React DOM renderer is much more serious: can lead to crashes that have no workaround.

@gunjanjaswal
gunjanjaswal merged commit fc6b9a5 into gunjanjaswal:add/inlined-react-runtime-check Sep 21, 2026
@gunjanjaswal

Copy link
Copy Markdown
Owner

Merged, thank you — this is a real step up from what I had. The per-package detection is the right call; lumping react-dom in with jsx-runtime always undersold how much worse an inlined DOM renderer is. I also hadn't accounted for the react-is false positive or the React 17 prod build hoisting Symbol.for into a local, so those catches are appreciated, and the dev-build warning is a nice bonus.

It's now in WordPress#1380, so it'll ride along there. Thanks for taking the time to build on it rather than just flagging the gap.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants