Remove dead code useAndroidRippleForView#56344
Conversation
|
Metro should fully support dead-code elimination for See https://github.com/facebook/metro/blob/main/packages/metro-transform-plugins/src/inline-plugin.js |
javache
left a comment
There was a problem hiding this comment.
Please validate this is a production issue
|
@javache well in case of but in cases
|
|
Metro specifically optimizes Platform.OS and assumes its constant. The fix would be to ensure this transform works correctly in your configuration, which we prefer over forking this code. |
|
@javache you are right, I fixed it in diff. way (see updated PR desc.) |


Summary:
Metro inline plugin won't work when es import is used for
Platform, to remove dead-code I userequire()similar example:
react-native/packages/react-native/Libraries/Components/RefreshControl/RefreshControl.js
Line 22 in 37a1841
Before:
After:
Changelog:
[IOS] [CHANGED] - Remove
useAndroidRippleForViewdead-code from iOS buildsTest Plan: