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
Copy file name to clipboardExpand all lines: docs/platforms/react-native/manual-setup/metro.mdx
+40-5Lines changed: 40 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
title: Metro
3
-
description: "Learn about the Metro bundler and how to configure it for your your application with Sentry React Native SDK."
3
+
description: "Learn about the Metro bundler and how to configure it for your application with Sentry React Native SDK."
4
4
sidebar_order: 3
5
5
---
6
6
7
-
Sentry's React Native SDK package ships with a Sentry Metro Serializer which allows you to automatically generate Debug IDs for your applications' bundles. This is crucial for making source maps work properly with Sentry.
7
+
Sentry's React Native SDK package ships with a Sentry Metro Plugin which allows you to automatically generate Debug IDs for your applications' bundles. This is crucial for making source maps work properly with Sentry. The plugin also helps you to annotate React component names so they are available in breadcrumbs and minimize the bundle size by removing unused SDK features.
8
8
This page will guide you through the process of setting up the Metro Plugin for your application.
9
9
10
10
## Prerequisities
@@ -15,11 +15,11 @@ This page will guide you through the process of setting up the Metro Plugin for
15
15
16
16
## Configuration
17
17
18
-
The Sentry React Native SDK allows multiple ways to configure the Sentry Metro Serializer, depending on your current use of `customeSerializer` in your Metro configuration.
18
+
The Sentry React Native SDK allows multiple ways to configure the Sentry Metro Plugin, depending on your current use of the Metro configuration.
19
19
20
-
### Use Sentry Metro Serializer
20
+
### Use the Sentry Metro Plugin
21
21
22
-
The example below shows how to use the Sentry Metro Serializer if you don't have any `customSerializers` (the default configuration).
22
+
The example below shows how to use the Sentry Metro Plugin with the default config.
If you already have a custom transformer, ensure that the Sentry Metro Plugin is applied as the last step. The Sentry Metro Plugin doesn't overwrite the existing configuration, it extends or wraps existing properties.
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.
0 commit comments