netlify-build-plugin-debugbear

Automatically test each Netlify build with DebugBear

Usage no npm install needed!

<script type="module">
  import netlifyBuildPluginDebugbear from 'https://cdn.skypack.dev/netlify-build-plugin-debugbear';
</script>

README

DebugBear Netlify Build Plugin

This Build Plugin automatically tests each Netlify deployment with DebugBear. This allows you to see how your changes have affected page performance and Lighthouse scores.

You need a DebugBear account to use this plugin.

DebugBear build result

Setup

  1. Install DebugBear Build Plugin

yarn add netlify-build-plugin-debugbear

  1. Add the plugin in your netlify.toml file:
[[plugins]]
  package = "netlify-build-plugin-debugbear"
  1. Set environment variables

You need to set two environment variables in your Netlify build settings.

  1. DEBUGBEAR_API_KEY – API key for your DebugBear project
  2. DEBUGBEAR_PAGE_IDS – Comma-separated list of page IDs for pages that should be tested after each deployment

Netlify environment variables

You can find the test results in the Builds tab on DebugBear, or via the links in your Netlify build logs.

Netlify build logs

Reporting build results to GitHub

Install the DebugBear GitHub integration to create statuses on your pull requests.

Set up a Performance budget to make your test finish in a pass or fail state.

DebugBear data on GitHub