Skip to content

bundler-metro: allow configuring Metro bind host#70

Merged
V3RON merged 2 commits intocallstackincubator:mainfrom
hannojg:codex/metro-bind-host-env
Mar 6, 2026
Merged

bundler-metro: allow configuring Metro bind host#70
V3RON merged 2 commits intocallstackincubator:mainfrom
hannojg:codex/metro-bind-host-env

Conversation

@hannojg
Copy link
Contributor

@hannojg hannojg commented Mar 5, 2026

Summary

  • add optional support for HARNESS_METRO_BIND_HOST in @react-native-harness/bundler-metro
  • when set, pass this value as host to Metro.runServer(...)
  • keep current behavior unchanged when the env var is not set

Why

In some iOS physical-device environments (for example AWS Device Farm on iOS), Metro must bind to IPv6 (::) for app-to-Metro connectivity. Today host binding is implicit, which can prevent connectivity even when the app receives a correct IPv6 packager URL.

This keeps default behavior intact while allowing callers to opt in with:

HARNESS_METRO_BIND_HOST=:: react-native-harness --harnessRunner ios

@vercel
Copy link

vercel bot commented Mar 5, 2026

@hannojg is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@V3RON
Copy link
Contributor

V3RON commented Mar 5, 2026

I think we can put it in the config file as the 'host' property. Could you also generate a version plan with Nx and update the docs so this option is publicly known? 🙏

@V3RON V3RON merged commit a0f64b1 into callstackincubator:main Mar 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants