parcel-plugin-honeybadger

Parcel plugin to upload source maps to Honeybadger's API - https://docs.honeybadger.io/lib/javascript/guides/using-source-maps.html

Usage no npm install needed!

<script type="module">
  import parcelPluginHoneybadger from 'https://cdn.skypack.dev/parcel-plugin-honeybadger';
</script>

README

Honeybadger's Parcel Source Map Plugin

npm version

This is a Parcel 1.x plugin to upload javascript sourcemaps to Honeybadger's API endpoint for source maps.

Installation

Install using npm or yarn:

yarn add --dev parcel-plugin-honeybadger

Configuration

The plugin takes all of the parameters from environment variables. It supports using dotenv and dotenv-expand since Parcel does that.

The plugin uses the following environment variables to prepare Honeybadger Sourcemap API's parameters:

HONEYBADGER_API_KEY (required)
The API key of your Honeybadger project.>
HONEYBADGER_ASSET_BASE_URL (required)
The base URL to production assets (scheme://host[:port]) without trailing slash. The plugin combines HONEYBADGER_ASSET_BASE_URL with publicURL and the generated minified js file name to build the API parameter minified_url
HONEYBADGER_REVISION (optional)
The deploy revision (i.e. commit sha) that your source map applies to. This could also be a code version. For best results, set it to something unique every time your code changes.