Repository navigation
Stop react-native-pager-view from entering the web bundle of the example app - #4604
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
Description
Since #4589 the web build of
expo-examplefails withUnable to resolve module ../../src/private/devsupport/rndevtools/ReactDevToolsSettingsManager from react-native/Libraries/Core/setUpReactDevTools.js.The new
Native intercept cancellationtest screen importsreact-native-pager-viewstatically. The screen is registered withunsupportedPlatformsfor web, but that only hides it from the list, Metro still resolves the import for every platform. On webPagerViewNativeComponentpulls incodegenNativeCommands, which reachesInitializeCorethroughRendererProxy, andInitializeCorerequires a module that only ships.ios.jsand.android.jsvariants.The screen is now
index.android.tsx, with anindex.tsxstub for the other platforms, the same pattern the legacypagerAndDrawerexample uses. The import never enters the web graph.Test plan
expo startweb, Android and iOS bundles all build. The web bundle contains the stub and noreact-native-pager-viewmodule, the Android bundle contains the real screen.yarn ts-checkand eslint pass.