xref: /expo/packages/@expo/metro-runtime/README.md (revision 26ad19fc)
1*26ad19fcSEvan Bacon# @expo/metro-runtime
2*26ad19fcSEvan Bacon
3*26ad19fcSEvan BaconInjects runtime code required for advanced Metro bundling features in the Expo ecosystem.
4*26ad19fcSEvan Bacon
5*26ad19fcSEvan Bacon## Usage
6*26ad19fcSEvan Bacon
7*26ad19fcSEvan Bacon> `expo-router` users do not need to install this package, it is already included.
8*26ad19fcSEvan Bacon
9*26ad19fcSEvan Bacon```js
10*26ad19fcSEvan Baconyarn add @expo/metro-runtime
11*26ad19fcSEvan Bacon```
12*26ad19fcSEvan Bacon
13*26ad19fcSEvan BaconImport this somewhere in the initial bundle. For example, the `App.js`:
14*26ad19fcSEvan Bacon
15*26ad19fcSEvan Bacon```js
16*26ad19fcSEvan Baconimport '@expo/metro-config';
17*26ad19fcSEvan Bacon```
18*26ad19fcSEvan Bacon
19*26ad19fcSEvan Bacon`expo/metro-config` will automatically move this import to be first in the bundle.
20