Revert unneeded diff in metro config #959
Closed
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.
Please select one of the following
Summary
I was looking into our Circle CI E2E tests, when I noticed we had this strange diff. Our metro config was loading two modules (InitializeCore + Image Asset Registry) before other modules. Looking deeper, I saw React Native Windows had a bug around this too. They added that behavior to their metro config in microsoft/react-native-windows#4814 , fixed the issue upstream in the CLI with react-native-community/cli#1115 , and then backed out the change in React Native Windows in microsoft/react-native-windows#4939 .
After the CLI change went in, it seems like we too should not need to load these modules first, so I am removing this change.
Changelog
[General] [Fixed] - Removed unnecessary diff from upstream in our metro config
Test Plan
This change was originally added to fix fast refresh, so I'm hoping testing fast refresh on rn-tester + CI checks should be enough. I'll also tag @acoates-ms who made the CLI / RNW changes to verify I'm not being dumb or missed anything.