getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.56k stars 330 forks source link

Support `rnx-kit` Serializers with `createSentryMetroSerializer` #3748

Open renchap opened 5 months ago

renchap commented 5 months ago

metro-serializer-esbuild is an alternative serializer for React Native that uses esbuild, allowing a better tree-shaking of your bundle. This is useful in multiple cases, for example if you use the Font Awesome SVG icons

Unfortunately, it does not work with createSentryMetroSerializer because you need to call createSentryBundleCallback when you provide a custom serializer, which is not done when you use a third party serializer.

krystofwoldrich commented 5 months ago

@renchap Thank you for opening the issue, I'll label this as feature request and we'll discuss this internally.

krystofwoldrich commented 4 months ago

I've renamed this issue to track compatibility with both https://microsoft.github.io/rnx-kit/docs/tools/metro-serializer and https://microsoft.github.io/rnx-kit/docs/tools/metro-serializer-esbuild