-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: Use metro extraNodeModules instead of rn-nodeify #15378
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
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@@ -31,6 +31,17 @@ module.exports = function (baseConfig) { | |||
...defaultConfig.resolver.extraNodeModules, | |||
crypto: require.resolve('react-native-crypto'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be replaced with react-native-quick-crypto
if we can
|
|
Description
This PR removes
rn-nodeify
in favor of the more modernextraNodeModules
field in metro for React Native. This provides a bit of a cleaner interface to work with and doesn't require mutation of node_modulesReference - https://gist.github.com/parshap/e3063d9bf6058041b34b26b7166fd6bd#metroconfigjs-and-extranodemodules
Related issues
Fixes:
Manual testing steps
App should still function as normally. Ex. To confirm crypto polyfill, console log the import of
crypto
and notice that it should matchreact-native-crypto
, which we're using to fillcrypto
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist