Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow OOT platforms to use custom resolver.resolveRequest (#41697)
Summary: Currently, when we have an additional platform in `react-native.config.js`, users cannot use custom `resolver.resolveRequest` functions as they are overwritten by `reactNativePlatformResolver`. Goal of this PR is to allow OOT platforms to use additional custom resolvers besides remapping react native imports. ## Changelog: [GENERAL] [FIXED] - Allow Out Of Tree platforms to pass custom resolvers Pull Request resolved: #41697 Test Plan: 1. Add additional platform in `react-native.config.js` 2. Pass custom resolver to `metro.config.js`: ```js resolveRequest: (context, moduleName, platform) => { console.log('resolveRequest', moduleName, platform); return context.resolveRequest(context, moduleName, platform); } ``` 3. Check if user's `resolveRequest` function is called. Reviewed By: huntie Differential Revision: D51659721 Pulled By: robhogan fbshipit-source-id: 952589b59a6fa34e9406d36c900be53a7c1a79c3
- Loading branch information