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.

Installation

Using npm:

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

Using yarn:

$ yarn add webpack-sentry-plugin --dev

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 that returns a string

Thanks

Contributing

Contributions are welcome 😄. To run the tests, please ensure you have the relevant environment variables set up. You can cp .env.example .env and fill it in.

Commands to be aware of

Warning: The test suite will create releases & upload files. They should be cleaned up afterward, but ensure that you are not overwriting something important!

  • npm test: Runs the test suite
  • npm run build: Compiles distribution build

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