Skip to content

bakunyo/bugsnag-sourcemap-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BugsnagSourceMapPlugin

dependencies Travis CI npm version

A Webpack plugin to upload sourcemaps to Bugsnag after build

Installation

$ npm install --save-dev bugsnag-sourcemap-webpack-plugin

Usage

In your webpack.config.js

const BugsnagSourceMapPlugin = require('bugsnag-sourcemap-webpack-plugin');

module.exports = {
  // your settings for webpack
  devtool: 'source-map',
  plugins: [
    new BugsnagSourceMapPlugin({
      apiKey: 'YOUR_BUGSNAG_API_KEY',
      publicPath: 'https://your.site/assets/path'
    }),
  ]
}

Options

key required content default
apiKey y the Bugsnag API key that is used in your app. -
publicPath y the Base hosted url of your compiled assets. -
appVersion the version of the app that the source map applies to as set in the JavaScript notifier. -
silent whether or not ignore js errors in upload to Bugsnag. false
overwrite whether to overwrite any existing version of files. false
uploadSource whether to upload source file (see minifiedFile in Bugsnag docs). false
removeSourceMap whether to remove sourcemap file after uploaded. true

Reference

Bugsnag - Sourcemap Upload API