Skip to content

Commit e845e13

Browse files
fix(metro): add missing config file names (#10412)
1 parent 8548aeb commit e845e13

File tree

1 file changed

+4
-3
lines changed
  • docs/platforms/react-native/manual-setup

1 file changed

+4
-3
lines changed

docs/platforms/react-native/manual-setup/metro.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ The Sentry React Native SDK allows multiple ways to configure the Sentry Metro S
2121

2222
The example below shows how to use the Sentry Metro Serializer if you don't have any `customSerializers` (the default configuration).
2323

24-
```javascript {tabTitle:React Native}
24+
```javascript {tabTitle:React Native} {filename:metro.config.js}
2525
const { getDefaultConfig } = require("@react-native/metro-config");
2626
const { withSentryConfig } = require('@sentry/react-native/metro');
2727

2828
const config = getDefaultConfig(__dirname);
2929
module.exports = withSentryConfig(config);
3030
```
3131

32-
```javascript {tabTitle:Expo}
32+
```javascript {tabTitle:Expo} {filename:metro.config.js}
3333
// const { getDefaultConfig } = require("expo/metro-config");
3434
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
3535

@@ -41,7 +41,7 @@ const config = getSentryExpoConfig(config, {});
4141

4242
If you already have a custom serializer, you can wrap it with the Sentry Metro Serializer and call `options.sentryBundleCallback` before serializing the bundle content.
4343

44-
```javascript {tabTitle:React Native}
44+
```javascript {tabTitle:React Native} {filename:metro.config.js}
4545
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
4646
const { withSentryConfig } = require('@sentry/react-native/metro');
4747

@@ -79,3 +79,4 @@ export type Bundle = {
7979

8080
- Sentry Metro Serializer can't add Debug ID to the Hermes Composed Source Maps. Please see [Manual Upload With Hermes](/platforms/react-native/sourcemaps#manual-upload-with-hermes) guide on how to add Debug ID to the Hermes Composed Source Maps.
8181
- If you see `Debug ID was not found in the bundle.` error message the `sentryBundleCallback` was not called by your custom serializer.
82+
- If Metro configuration is missing in your Expo project, create it using `npx expo customize metro.config.js`. Read more about [Customizing Expo Metro Configuration](https://docs.expo.dev/guides/customizing-metro/).

0 commit comments

Comments
 (0)