Giter Site home page Giter Site logo

webpack-bugsnag-plugin's Introduction

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

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 and deploy infrequently. **

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

License

MIT License ❤️

webpack-bugsnag-plugin's People

Contributors

eblin avatar jmshal avatar lottamus avatar mprobber avatar nwbauer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.