Skip to content

Consolidate generated view config imports - #58651

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D121383217
Closed

rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D121383217

Conversation

@rubennorte

@rubennorte rubennorte commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary:
Generated view configs currently emit repeated property accesses from React Native entry-point requires and route commands through a renderer namespace. Consolidate imports by source and expose dispatchCommand directly from the unstable internals entry point, reducing generated Hermes bytecode while preserving existing stable root exports. Metro's inline-require transform would otherwise expand the consolidated unstable-internals binding back into repeated require(...) calls, so keep that dependency non-inlined while leaving other generated imports eligible for lazy loading. Make the unstable HMRClient export follow React Native's normal development/production selection so production consumers receive HMRClientProdShim instead of including HMR tooling.

Changelog:
[General][Fixed] - Reduce generated native component bundle overhead

Reviewed By: javache

Differential Revision: D121383217

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2026
@meta-codesync

meta-codesync Bot commented Sep 23, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D121383217.

Summary:
Generated view configs currently emit repeated property accesses from React Native entry-point requires and route commands through a renderer namespace. Consolidate imports by source and expose `dispatchCommand` directly from the unstable internals entry point, reducing generated Hermes bytecode while preserving existing stable root exports. Metro's inline-require transform would otherwise expand the consolidated unstable-internals binding back into repeated `require(...)` calls, so keep that dependency non-inlined while leaving other generated imports eligible for lazy loading. Make the unstable `HMRClient` export follow React Native's normal development/production selection so production consumers receive `HMRClientProdShim` instead of including HMR tooling.

Changelog:
[General][Fixed] - Reduce generated native component bundle overhead

Reviewed By: javache

Differential Revision: D121383217
@meta-codesync meta-codesync Bot closed this in f156ef2 Sep 24, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Sep 24, 2026
@meta-codesync

meta-codesync Bot commented Sep 24, 2026

Copy link
Copy Markdown

This pull request has been merged in f156ef2.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant