Skip to content

feat: expose modules in runtime both in development and production#1645

Open
tjzel wants to merge 1 commit intofacebook:mainfrom
tjzel:@tjzel/expose-modules
Open

feat: expose modules in runtime both in development and production#1645
tjzel wants to merge 1 commit intofacebook:mainfrom
tjzel:@tjzel/expose-modules

Conversation

@tjzel
Copy link

@tjzel tjzel commented Jan 29, 2026

Summary

Expose getModules function in both development and release environments. This allows the developers to dynamically replace a module in runtime.

I personally use it in react-native-worklets to replace react-native module on extra JavaScript runtimes. react-native module includes side-effects that are fatal on these extra runtimes and replacing it with a mock module improves developer experience significantly, in case they import react-native accidentally in runtime.

Changelog: [Feature] Expose modules in runtime both in development and production

Test plan

Nothing to test really.

@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 Jan 29, 2026
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jan 29, 2026
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants