https://github.com/sectorlabs/sentry-source-maps-webpack-plugin
Upload source maps to Sentry automatically.
https://github.com/sectorlabs/sentry-source-maps-webpack-plugin
Last synced: 3 months ago
JSON representation
Upload source maps to Sentry automatically.
- Host: GitHub
- URL: https://github.com/sectorlabs/sentry-source-maps-webpack-plugin
- Owner: SectorLabs
- Created: 2017-12-30T08:12:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T01:58:22.000Z (almost 4 years ago)
- Last Synced: 2025-03-30T16:01:48.993Z (about 1 year ago)
- Language: JavaScript
- Size: 122 KB
- Stars: 1
- Watchers: 31
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sentry Source Maps Webpack Plugin
[](http://doge.mit-license.org)
[](https://badge.fury.io/js/sentry-source-maps-webpack-plugin)
This Webpack plugin automatically uploads source maps generated during the build to Sentry.io.
## Why not use the official plugin?
The [sentry-webpack-plugin](https://github.com/getsentry/sentry-webpack-plugin) doesn't allow configuration through the Webpack plugin itself or environment variables.
There are a couple of other reasons to use this plugin over the official one:
* Use the `publicPath` from your Webpack configuration rather than assuming `/`.
* Override the `publicPath` per file (useful for Node.JS code).
## Installation
1. Install the package from NPM:
λ yarn add sentry-source-maps-webpack-plugin
2. Follow the instructions for the official plugin regarding getting a authentication token:
* [Official docs](https://docs.sentry.io/clients/javascript/sourcemaps/#using-sentry-webpack-plugin)
2. Add the plugin to your Webpack configuration:
const SentrySourceMapsPlugin = require('sentry-source-maps-webpack-plugin');
const config = {
plugins: [
new SentrySourceMapsPlugin({
org: 'my-org',
project: 'my-project',
authToken: 'sentry auth token',
version: '1.0',
// not required
retries: 5,
timeout: 1000,
publicPaths: {
'server.js': '/',
'server.js.map': '/',
},
}),
]
};
3. Make sure to specify the exact same version when configuring Raven:
* [Official docs](https://docs.sentry.io/clients/javascript/sourcemaps/#verify-you-have-specified-the-release-in-your-client-config)