@honeybadger-io/webpack v6.3.0
Honeybadger's Webpack Source Map Plugin
Webpack plugin to upload JavaScript source maps to Honeybadger. You can also send deployment notifications.
Word Up! to the thredUP development team for a similar webpack plugin they have authored.
Installation
# npm
npm install @honeybadger-io/webpack --save-dev
# yarn
yarn add @honeybadger-io/webpack --dev
Configuration
Plugin parameters
These plugin parameters correspond to the Honeybadger Source Map Upload API and Deployments API.
Vanilla webpack.config.js
const HoneybadgerSourceMapPlugin = require('@honeybadger-io/webpack')
const ASSETS_URL = 'https://cdn.example.com/assets';
const webpackConfig = {
plugins: [new HoneybadgerSourceMapPlugin({
apiKey: 'abc123',
assetsUrl: ASSETS_URL,
revision: 'main',
// You can also enable deployment notifications:
deploy: {
environment: process.env.NODE_ENV,
repository: "https://github.com/yourusername/yourrepo"
}
})]
}
Rails Webpacker config/webpack/environment.js
const { environment } = require('@rails/webpacker')
const HoneybadgerSourceMapPlugin = require('@honeybadger-io/webpack')
// Assumes Heroku / 12-factor application style ENV variables
// named GIT_COMMIT, HONEYBADGER_API_KEY, ASSETS_URL
const revision = process.env.GIT_COMMIT || 'main'
environment.plugins.append(
'HoneybadgerSourceMap',
new HoneybadgerSourceMapPlugin({
apiKey: process.env.HONEYBADGER_API_KEY,
assetsUrl: process.env.ASSETS_URL,
silent: false,
ignoreErrors: false,
revision: revision
}))
module.exports = environment
Development
- Run
npm install
- Run the tests with
npm test
- Build/test on save with
npm run build:watch
andnpm run test:watch
See the /example
folder for a project to test against.
License
This package is MIT licensed. See the MIT-LICENSE file in this folder for details.
9 months ago
9 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago