Webpack plugins for reporting builds and uploading source maps to Bugsnag error monitoring. Current stable version is 2.2.3, released 2024 with maintenance updates. These plugins integrate Bugsnag's CLI for source map upload and build reporting directly into the Webpack build pipeline. Key differentiator: seamless integration with webpack 3/4/5, automatic source control detection from .git/.hg/package.json, and configurable log levels. Replaces manual invocation of @bugsnag/cli. Suitable for production builds to ensure stack traces are deobfuscated and build metadata is captured.
npm install webpack-bugsnag-pluginsVerified import paths — ran on the pinned version, not inferred.
Minimal webpack config using both plugins for production builds. Filters out plugins when not in dist mode.
Upgrade to v2+ and ensure @bugsnag/cli is in devDependencies. See CHANGELOG.
Upgrade to v2.1.0 or later to use overwrite option.
Check webpack compilation result; ensure plugin runs only after successful builds.
Pass an object: new BugsnagBuildReporterPlugin({ apiKey: ..., appVersion: ... })Explicitly set releaseStage or autoAssignRelease to true.
npm install --save-dev @bugsnag/cli
Use const { BugsnagBuildReporterPlugin } = require('webpack-bugsnag-plugins'); or import { BugsnagBuildReporterPlugin } from 'webpack-bugsnag-plugins';new BugsnagBuildReporterPlugin({ apiKey: '...', appVersion: '...' })