Sentry plugin for Repack
npm install repack-plugin-sentry

A Repack plugin that automatically injects Sentry debug IDs into JavaScript bundles, enabling better source map tracking and error monitoring in your React Native applications.
- π Automatic Debug ID Generation: Generates unique debug IDs for each bundle
- πΊοΈ Source Map Integration: Connects source maps with bundles for better error tracking
- β‘ Zero Configuration: Works out of the box with sensible defaults
- π§ Re.Pack Compatible: Seamlessly integrates with Re.Pack build system
``bash`
npm install --save-dev repack-plugin-sentry
`bash`
yarn add --dev repack-plugin-sentry
`bash`
pnpm add --save-dev repack-plugin-sentry
Add the plugin to your rspack.config.js or Repack configuration:
`typescript
import { SentryDebugIdPlugin } from "repack-plugin-sentry";
export default {
plugins: [
new SentryDebugIdPlugin(),
// ... other plugins
],
};
`
When using standard Metro bundler, you would typically configure Sentry using the official Metro plugin:
`javascript
const { getDefaultConfig } = require("@react-native/metro-config");
const { withSentryConfig } = require("@sentry/react-native/metro");
const config = getDefaultConfig(__dirname);
module.exports = withSentryConfig(config);
``
However, when using Re.Pack as your bundler instead of Metro, the official Sentry Metro plugin is not available. This plugin provides the same functionality for Re.Pack users, automatically injecting debug IDs into your JavaScript bundles to enable proper source map tracking and error monitoring.
For more information about the official Metro setup, see the Sentry documentation.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT Β© gronxb