Collect the application's modules, then hand Metro its configuration back.
This is the whole of the native build's code generation, and it lives here for one reason:
Metro loads metro.config.js whatever brought it up. expo start, expo run:ios, an EAS
build, an editor extension, all of them go through this file, so wiring the generation here is
what makes it happen without anyone remembering to ask.
It runs synchronously and before the configuration is returned, so the manifest exists by the
time Metro resolves the first import.
One thing to know: the manifest is written when Metro starts, not while it runs. Adding a page
to a running dev server means restarting it, the same as changing this configuration would.
Editing a page that already exists needs nothing: Fast Refresh has never involved this file.
Collect the application's modules, then hand Metro its configuration back.
This is the whole of the native build's code generation, and it lives here for one reason: Metro loads
metro.config.jswhatever brought it up.expo start,expo run:ios, an EAS build, an editor extension, all of them go through this file, so wiring the generation here is what makes it happen without anyone remembering to ask.It runs synchronously and before the configuration is returned, so the manifest exists by the time Metro resolves the first import.
One thing to know: the manifest is written when Metro starts, not while it runs. Adding a page to a running dev server means restarting it, the same as changing this configuration would. Editing a page that already exists needs nothing: Fast Refresh has never involved this file.