You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expo: fix missing metro config/cli, scope prebuild to the platform under test
Two functional bugs in the Expo test path, both exposed by the
xcodebuild-bypass change: create-expo-app's blank template ships without
a metro.config.js, and Expo doesn't depend on @react-native-community/cli
itself - but react-native-xcode.sh's bundling step (used by both the
initial build and the fast-path scenario-switch rebuild) shells out to
react-native's own cli.js, which needs both to be present. Add the
missing metro.config.js customize step and the cli devDependency.
Also address the resulting perf cost of always running `expo prebuild`
for both platforms:
- Scope `expo prebuild` to only the platform actually under test in this
mocha run (`--platform ios`/`--platform android`), instead of the
default "all" - this was the single largest win found in the whole
investigation, since prebuild was regenerating an entire unused
platform's native project on every project setup.
- Drop `--clean` from the repeated `expo prebuild` call in
createUpdateArchive: that project's native tree is already a clean
Expo-managed one from setupProject, app.json never changes between
these repeated calls, and nothing ever builds this project's native
code (only `react-native bundle` reads from it) - a full wipe-and-
regenerate here was pure wasted cost since incremental reconciliation
is a no-op in this case. setupProject's own prebuild call keeps
--clean, since it needs to wipe the bare-RN template files that
copyTemplate copies in ahead of it.
.then((result)=>{console.log(`[TIMING] createUpdateArchive(${projectDirectory}, ${targetPlatform.getName()}) took ${Date.now()-t0}ms`);returnresult;});
0 commit comments