Skip to content

chore(testers): add Rozenite DevTools plugins to tester apps - #1509

Open
dannyhw wants to merge 1 commit into
mainfrom
feat/rozenite-tester-apps
Open

dannyhw wants to merge 1 commit into
mainfrom
feat/rozenite-tester-apps

Conversation

@dannyhw

@dannyhw dannyhw commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds Rozenite to the tester apps so we get extra React Native DevTools panels while debugging Re.Pack. It is opt-in: start a tester's dev server with WITH_ROZENITE=true. Without the flag, withRozenite returns the config unchanged (/rozenite 404s).

App Config wrapped Plugins
tester-app rspack.config.mjs, webpack.config.mjs network activity
tester-federation config.host-app.mts (rspack + webpack) network activity, React Navigation, storage
tester-federation-v2 config.host-app.mts (rspack + webpack) network activity, React Navigation, storage
tester-expo rspack.config.mjs network activity
  • Only the MF host dev servers are wrapped, since DevTools connects to the server the host bundle comes from. Mini-app and widget servers don't need it.
  • The storage plugin points at the AsyncStorage instance that ScriptManager uses for its cache, so cached remote scripts can be inspected in the MF hosts.
  • withOnBootNetworkActivityRecording() runs in each entry so early requests (e.g. MF v2 manifest/preload fetches) are captured.
  • tester-expo passes projectType: 'react-native-cli'. Rozenite otherwise guesses "Expo" and patches the dev-middleware copy resolved through Expo's CLI, but Re.Pack serves DevTools through React Native's copy. They happen to be the same file in this workspace today, but that isn't guaranteed.
  • tester-expo doesn't get the React Navigation plugin. expo-router 57 vendors React Navigation, so useNavigationContainerRef() from expo-router doesn't typecheck against the plugin's @react-navigation/core types, and I didn't want a cast. (Upstream issue: the Rozenite docs show exactly this usage.)
  • Plugin hooks are no-ops when NODE_ENV === 'production', so release bundles aren't affected.
  • All packages are dev dependencies pinned in the testers catalog (2.5.0).

Test plan

  • WITH_ROZENITE=true dev servers for all four apps report the expected plugins at /rozenite/app/config. With the flag off, /rozenite returns 404.
  • Android emulator (tester-app, RN 0.86 before rebase): /json/list returns devtoolsFrontendUrl: /rozenite/rn_fusebox.html…, DevTools shows the Rozenite tab with the Network Activity panel, and a boot-time request was recorded
  • tester-app vitest (17/17), @callstack/repack-expo tests (125/125), biome, tsc for tester-expo (other testers have only pre-existing errors)
  • Device check on the MF v2 host (navigation + storage panels) after RN 0.88

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
repack-website Ready Ready Preview Oct 23, 2026 8:59am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 425ac31

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Wrap the tester-app, MF v1/v2 host and tester-expo configs with
withRozenite, gated behind WITH_ROZENITE=true, and wire up the network
activity plugin, plus React Navigation and AsyncStorage (ScriptManager
cache) plugins in the Module Federation hosts.

This branch was successfully deployed

1 active deployment
Preview — 425ac31a Deployed Oct 23, 2026 by vercel[bot]
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.

1 participant