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
@@ -135,6 +137,12 @@ To run React Native Tools commands via VS Code tasks, you can create a `.vscode/
135
137
}
136
138
```
137
139
140
+
# Customize metro configuration
141
+
142
+
Metro is a JavaScript bundler for React Native and include in React Native package. Metro configuration can be customized in `metro.config.js`.
143
+
144
+
Note: From React Native 0.72.0, the config loading setup for Metro in React Native CLI(`@react-native/metro-config`).
145
+
138
146
# Debugging React Native applications
139
147
140
148
To start debugging create a new debug configuration for your ReactNative app in your `.vscode/launch.json`. Adding a new configuration can be done by opening your `launch.json` file and clicking on `Add Configuration...` button and then selecting `React Native` option. After that the extension will prompt you to create a debugging configuration by selecting debugging parameters in dropdown lists at the top of the editor. A new debugging configuration will be generated and added to the `launch.json` file automatically as shown in the image below. For Expo projects, please make sure choose `Application in direct mode(Hermes)` if you are using SDK 48 or a newer SDK.
@@ -497,6 +505,67 @@ To debug a macOS Hermes application you can use `Debug macOS Hermes - Experiment
3. After mapping common key to common/ path, we can include any files inside common/ relative to this path. Metro is started, launching or debugging is working well.
564
+
565
+
```js
566
+
import { commonFunction } from"common/utils";
567
+
```
568
+
500
569
## TypeScript and Haul
501
570
502
571
### Sourcemaps
@@ -726,14 +795,25 @@ If you use Android, you need to change the debug server by:
726
795
5. (Hermes only) Hermes engine listens port 8081 for debugging by default, to change it you might need to modify your [`metro.config.js` file adding `"port": portNumber` argument in there to the server settings](https://facebook.github.io/metro/docs/configuration/#port).
0 commit comments