0.1.4 • Published 6 years ago

webpack-bugsnag-plugin v0.1.4

Weekly downloads
1,870
License
MIT
Repository
github
Last release
6 years ago

Webpack Bugsnag Plugin(s)

Latest version Dependencies Total downloads

This module contains webpack plugins to help ease Bugsnag into your webpack build process.

Install

The Bugsnag plugins are available on npm, you can install them into your project by running the following command in the root of your project.

$ npm i --save-dev webpack-bugsnag-plugin

Usage

const {
  BugsnagDeployPlugin,
  BugsnagSourceMapPlugin
} = require('webpack-bugsnag-plugin');

module.exports = {
  devtool: 'source-map',
  // ...
  plugins: [
    // WebpackS3Plugin(...)
    new BugsnagDeployPlugin({
      apiKey: 'e48e13207341b6bffb7fb1622282247b',
      releaseStage: 'production',
      appVersion: '1.7.0',
    }),
    new BugsnagSourceMapPlugin({
      apiKey: 'e48e13207341b6bffb7fb1622282247b',
      publicPath: 'http*://*example.com/build',
      appVersion: '1.7.0',
    }),
  ],
};

BugsnagSourceMapPlugin

Check out https://docs.bugsnag.com/api/js-source-map-upload/ for more information about uploading sourcemaps to Bugsnag.

The BugsnagSourceMapPlugin plugin automatically uploads your bundle sourcemaps to Bugsnag, so when errors occur within your application you see the original source code right within your Bugsnag dashboard.

Options

OptionDescriptionRequiredDefault
apiKeyYour Bugsnag project API key. You can find this key from within your project's settings page.*n/a
publicPathThe url of your minified bundle(s). This option supports wildcards (eg. http*://example.com if your bundle is served from HTTP & HTTPS).*output.publicPath
appVersionThe version of your app your bundle relates to. This option is automatically calculated from your package.json if one exists.**
overwriteIf you have already pushed sourcemap files to Bugsnag for a particular version of your app, you can pass this option to replace it.false
endpointFor Bugsnag Enterprise, this is your custom endpoint to send sourcemaps to. Omit this option if you're not using Bugsnag Enterprise.https://upload.bugsnag.com

** These options automatically default to information within your project's package.json file, or your local Git repository.

BugsnagDeployPlugin

Check out https://docs.bugsnag.com/api/deploy-tracking/ for more information about Bugsnag deploy tracking.

The BugsnagDeployPlugin plugin automatically pushes deploy events to Bugsnag when your webpack bundle builds successfully. This makes it easy from your Bugsnag dashboard when you deployed changes to your app, and the impact it had on the number of errors have occurred since.

Options

OptionDescriptionRequiredDefault
apiKeyYour Bugsnag project API key. You can find this key from within your project's settings page.*n/a
releaseStageThe environment in which the deployed occurred (eg. production, testing, development).production
repositoryThe Git repository which contains the source code being deployed.**
providerIf your repository is hosted on a on-premise solution, you will need to supply the provider (eg. github-enterprise, bitbucket-server, gitlab-onpremise).
branchThe source control branch from which you are deploying the code. Only relevant when repository is supplied.**
revisionThe source control revision id for the code you are deploying. Required when repository is supplied.**
appVersionThe app version of the code you are currently deploying. Only set this if you tag your releases with semantic version numbers and deploy infrequently.**

** These options automatically default to information within your project's package.json file, or your local Git repository.

License

MIT License ❤️

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago