repack-plugin-sentry
v0.1.4
Published
Sentry plugin for Repack
Readme
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.
Features
- 🔍 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
Installation
npm install --save-dev repack-plugin-sentryyarn add --dev repack-plugin-sentrypnpm add --save-dev repack-plugin-sentryUsage
Basic Usage
Add the plugin to your rspack.config.js or Repack configuration:
import { SentryDebugIdPlugin } from "repack-plugin-sentry";
export default {
plugins: [
new SentryDebugIdPlugin(),
// ... other plugins
],
};Why use this plugin?
When using standard Metro bundler, you would typically configure Sentry using the official Metro plugin:
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.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT © gronxb
