New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Platform select on web falls back native when bundling with metro #27801
Comments
@keith-kurak FYI |
Thank you for filing this issue! |
Hi @jparksecurity! Thanks for creating this issue. Unfortunately, this is a bug inside Metro itself. To give you a quick summary:
Since this is quite a big change, I'm not sure if we can backport this to SDK 50, but I'll check. To avoid this issue, you could add the Hope this helps! |
@byCedric Thank you for the detailed explanation! Sorry, I didn't realize the fix had been merged. I'll keep an eye out for the fix release! |
Summary
Ref: https://discord.com/channels/695411232856997968/1219438969763401878/1219438969763401878
what the expected behavior is
Platform.select
falls back todefault
, which does onexpo start --web
, whenweb
is not specified.what is actually happening
Platform.select
falls back tonative
when bundling with metro byexpo export --platform web
.What platform(s) does this occur on?
Web
SDK Version
50
Environment
Minimal reproducible example
https://github.com/jparksecurity/platform-select
Run
yarn web
to check ifPlatform.select
falls back todefault
.Then, run
yarn expo export --platform web
.dist/_expo/static/js/web
and searchOpen up App.js to start working on your app!
. You will seenative
next to this text.npx serve dist --single
) to check in a browser.The text was updated successfully, but these errors were encountered: