Skip to content

Commit

Permalink
[getsentry/action-github-commit] Auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
getsantry[bot] authored Dec 7, 2023
1 parent 59e122d commit 4a9dfd0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/platforms/react-native/manual-setup/metro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ The example below shows how to use the Sentry Metro Serializer if you don't have

```javascript {tabTitle:React Native}
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const { createSentryMetroSerializer } = require("@sentry/react-native/dist/js/tools/sentryMetroSerializer");
const {
createSentryMetroSerializer,
} = require("@sentry/react-native/dist/js/tools/sentryMetroSerializer");

const config = {
serializer: {
Expand All @@ -37,10 +39,12 @@ module.exports = mergeConfig(getDefaultConfig(__dirname), config);
```

```javascript {tabTitle:Expo}
const { mergeConfig } = require('metro');
const { getDefaultConfig } = require('expo/metro-config');
const { mergeConfig } = require("metro");
const { getDefaultConfig } = require("expo/metro-config");
const { createSentryMetroSerializer } = require("@sentry/react-native/metro");
const { withExpoSerializers } = require('@expo/metro-config/build/serializer/withExpoSerializers');
const {
withExpoSerializers,
} = require("@expo/metro-config/build/serializer/withExpoSerializers");

const config = getDefaultConfig(__dirname);

Expand All @@ -60,7 +64,9 @@ If you already have a custom serializer, you can wrap it with the Sentry Metro S

```javascript {tabTitle:React Native}
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const { createSentryMetroSerializer } = require("@sentry/react-native/dist/js/tools/sentryMetroSerializer");
const {
createSentryMetroSerializer,
} = require("@sentry/react-native/dist/js/tools/sentryMetroSerializer");

const myCustomSerializer = (entryPoint, preModules, graph, options) => {
let bundle = perapreBundle(entryPoint, preModules, graph, options);
Expand Down

0 comments on commit 4a9dfd0

Please sign in to comment.