Update reactNativePlatformResolver for new metro #1605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Metro changed how to hook into the resolver with this commit:
facebook/metro@d81d887
The reactNativePlatformResolver is still using the old format, which causes bundle commands to fail if the project has any out of tree platforms (Ex: react-native-windows-macOS)
Test Plan:
The following bundle command fails currently. But works after making this change locally.
npx --yes react-native@0.0.0-20220415-2010-3c1a81446 init testcli --template react-native@0.0.0-20220415-2010-3c1a81446
cd testcli
npx --yes react-native-windows-init@latest --verbose --version 0.0.0-canary.495 --overwrite --language cs --projectType app --namespace MyCompany.MyApplication.MyComponent
npx react-native bundle --entry-file index.js --platform windows --bundle-output test.bundle