Re.Pack: cases left out of #5482 (physical iPhone, remote runs, Re.Pack 4, indirect configs)

Open
#5,504 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react-native, typescript

Research direction

Start with the Re.Pack support added in #5482 and review the related decisions in #5481; the issue does not name source files or tests. Pick one limitation to investigate, then identify the relevant entry point and test coverage. Done means the chosen case is supported and verified, with its behavior added to the compatibility matrix where applicable.

Written by the indexing model from the issue text.

Description

area: cli priority: P3 type: feature

Problem

#5482 adds Re.Pack support with a deliberately narrow scope. These cases are refused, undetected or unverified after it, and each could be supported later.

Maintainer decision: "Can we file ticket for repack limitations where it could eventually be fixed but we excluded from this scope", 2026-11-11.

Evidence

From the review of #5482 and the decisions on #5481:

  1. Physical iPhone (ios --device) is refused. Stim does not pass --host, because Re.Pack writes its host into the bundle's publicPath and a wildcard host breaks chunk URLs. Re.Pack stays on localhost, which a phone on the LAN cannot reach.
  2. Tunnel and hosted --remote runs are refused. Re.Pack ignores EXPO_PACKAGER_PROXY_URL and keeps publicPath on localhost, so async chunks and assets would fail through the tunnel or the hosted Metro bridge.
  3. Re.Pack 4 is refused. It lacks the flags Stim passes (--no-interactive, --no-reverse-port, --json, --log-requests).
  4. A config that gets the plugin indirectly is not detected. Detection reads rock.config.* and react-native.config.* as text and looks for the import of @rock-js/plugin-repack; a shared config package that re-exports it leaves the app on Metro.
  5. False STIM_REPACK_BIN under pnpm isolation. When @callstack/repack is installed only as a dependency of a plugin, the bin is not resolvable from the project.
  6. Two devices of one platform in one workspace stay unverified. Re.Pack's request records carry no client pid, so a bundle request cannot be attributed to one device.
  7. No heartbeat and no idle stop. Each ensure probes the port, and a Re.Pack dev server is excluded from idle stop.
  8. A bundle that compiled with errors is still served in development (#5485). After #5482 such a launch reports unverified; a proven failure would be better.
  9. Not validated on real tools: the react-native start path (Re.Pack registered in react-native.config.js, without Rock), and Windows.

Cause

Scope of #5482; none is a regression.

Fix idea

  • 1 and 2: pass a host and rewrite or configure publicPath per run (Re.Pack's dev-server options), or serve chunks through Stim's bridge.
  • 4: evaluate the config in a child process with a timeout instead of reading text, or follow one level of re-export.
  • 5: resolve the bin from the plugin's own dependency tree.
  • 6: ask Re.Pack upstream for a client identifier in request logs, or attribute by connection.
  • 7: a liveness signal from the child.
  • 9: run both on real apps; add to the compatibility matrix.
Dominant language
TypeScript
Stars
100
Forks
8
Avg merge
4h 24m
Merged PRs (30d)
971

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appandflow/stim

All issues in appandflow/stim

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.