# webpack-bugsnag-plugin

> A collection of webpack plugins for integrating with Bugsnag

Latest version **0.1.4** (published 2017-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-bugsnag-plugin
pnpm add webpack-bugsnag-plugin
yarn add webpack-bugsnag-plugin
bun add webpack-bugsnag-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2017-12-27 |
| First published | 2017-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Jacob Marshall |
| Maintainers | jacobmarshall |
| Keywords | webpack, bugsnag, deploy, source-maps |

## Links

- npm: https://www.npmjs.com/package/webpack-bugsnag-plugin
- Repository: https://github.com/jacobmarshall/webpack-bugsnag-plugin
- Issues: https://github.com/jacobmarshall/webpack-bugsnag-plugin/issues
- npm.io page: https://npm.io/package/webpack-bugsnag-plugin

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [pkg-up](https://npm.io/package/pkg-up.md) 1.0.0
- [request](https://npm.io/package/request.md) ^2.79.0
- [bugsnag-sourcemaps](https://npm.io/package/bugsnag-sourcemaps.md) ^1.0.1
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.3

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.1.4 (latest) — 2017-12-27
- 0.1.3 — 2017-12-27
- 0.1.2 — 2017-12-27
- 0.1.1 — 2017-10-23
- 0.1.0 — 2017-09-28
- 0.0.10 — 2017-06-10
- 0.0.9 — 2017-04-01
- 0.0.8 — 2017-03-29
- 0.0.7 — 2017-02-07
- 0.0.6 — 2017-02-05
- 0.0.5 — 2017-02-05
- 0.0.4 — 2017-01-26
- 0.0.3 — 2017-01-25
- 0.0.2 — 2017-01-25
- 0.0.1 — 2017-01-25

## README

# Webpack Bugsnag Plugin(s)

![Latest version](https://img.shields.io/npm/v/webpack-bugsnag-plugin.svg)
![Dependencies](https://david-dm.org/jacobmarshall/webpack-bugsnag-plugin.svg)
![Total downloads](https://img.shields.io/npm/dt/webpack-bugsnag-plugin.svg)

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.

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

## Usage

```js
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

|Option    |Description                                                                                                                               |Required|Default                     |
|----------|------------------------------------------------------------------------------------------------------------------------------------------|--------|----------------------------|
|apiKey    |Your Bugsnag project API key. You can find this key from within your project's settings page.                                             |*       |n/a                         |
|publicPath|The url of your minified bundle(s). This option supports wildcards (eg. `http*://example.com` if your bundle is served from HTTP & HTTPS).|*       |`output.publicPath`         |
|appVersion|The version of your app your bundle relates to. This option is automatically calculated from your `package.json` if one exists.           |        |**                          |
|overwrite |If you have already pushed sourcemap files to Bugsnag for a particular version of your app, you can pass this option to replace it.       |        |`false`                     |
|endpoint  |For 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

|Option      |Description                                                                                                                                                                 |Required|Default     |
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|------------|
|apiKey      |Your Bugsnag project API key. You can find this key from within your project's settings page.                                                                               |*       |n/a         |
|releaseStage|The environment in which the deployed occurred (eg. `production`, `testing`, `development`).                                                                                |        |`production`|
|repository  |The Git repository which contains the source code being deployed.                                                                                                           |        |**          |
|provider    |If your repository is hosted on a on-premise solution, you will need to supply the provider (eg. `github-enterprise`, `bitbucket-server`, `gitlab-onpremise`).              |        |            |
|branch      |The source control branch from which you are deploying the code. Only relevant when `repository` is supplied.                                                               |        |**          |
|revision    |The source control revision id for the code you are deploying. Required when `repository` is supplied.                                                                      |        |**          |
|appVersion  |The app version of the code you are currently deploying. Only set this if you tag your releases with [semantic version numbers](http://semver.org/) and deploy infrequently.|        |**          |

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

## License

MIT License ❤️

---
_Source: https://npm.io/package/webpack-bugsnag-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
