Socket
Socket
Sign inDemoInstall

webpack-sentry-plugin

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-sentry-plugin

Webpack plugin to upload source maps to Sentry


Version published
Weekly downloads
4.3K
increased by21.88%
Maintainers
1
Weekly downloads
 
Created
Source

Sentry plugin

A webpack plugin to upload source maps to Sentry.

⚠ WIP ⚠

Installation

Using npm:

$ npm install webpack-sentry-plugin --save-dev

Using yarn:

$ yarn add webpack-sentry-plugin

Usage

  1. Require webpack-sentry-plugin:

    var SentryPlugin = require('webpack-sentry-plugin');
    
  2. Configure webpack to output source maps. Recommended reading: webpack docs, Sentry docs

  3. Add to webpack config:

    var config = {
      plugins: [
        new SentryPlugin({
          // Sentry options are required
          organisation: 'your-organisation-name',
          project: 'your-project-name',
          apiKey: process.env.SENTRY_API_KEY,
          
          // Release version name/hash is required
          release: function() {
            return process.env.GIT_SHA
          }
        })
      ]
    }
    
Options
  • exclude: RegExp to match for excluded files
var config = {
  plugins: [
    new SentryPlugin({
      // Exclude uploading of html
      exclude: /\.html$/,
      ...
    })
  ]
}
  • include: RegExp to match for included files
var config = {
  plugins: [
    new SentryPlugin({
      // Only upload foo.js & foo.js.map
      include: /foo.js/,
      ...
    })
  ]
}
  • organisation: Sentry organisation to upload files to
  • project: Sentry project to upload files to
  • apiKey: Sentry api keys. See Sentry docs for info on how to create one
  • release: Release name to attach source maps to. Can be string or function

Thanks

Keywords

FAQs

Package last updated on 18 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc