Skip to content

Configuration ​

Optional. npx @seybel/breakhound init creates one. If breakhound is in your dev dependencies you get breakhound.config.ts (or .mjs without TypeScript), fully typed:

ts
import { defineConfig } from '@seybel/breakhound';

export default defineConfig({
  exclude: ['/admin/**'],                       // or include: ['/blog/**']
  samples: { '/products/[id]': '/products/42' },
  widths: { min: 320, max: 1920 },
  ignore: ['.intercom-launcher', { selector: '.map', detectors: ['overlap'] }],
  detectors: { 'tiny-text': false, 'edge-gutter': 'info' },
  failOn: 'error',
});

Running breakhound through npx without installing it, you get breakhound.config.json instead. A TypeScript file importing a package that isn't installed would break your project's own type check (and builds that run it, like next build). The JSON file points at breakhound's schema, so your editor still suggests and explains every option:

json
{
  "$schema": "https://cdn.jsdelivr.net/npm/@seybel/breakhound/dist/schema.json",
  "exclude": ["/admin/**"]
}

.js, .cjs and .mts configs work too. The types ship for both import and require.

OptionWhat it does
baseUrlScan this server instead of finding or starting the dev server
routesScan exactly these routes instead of discovering them
include, excludeRoute globs: * is one segment, ** any number
samplesA real URL for a dynamic route
paramsReal values for dynamic route parameters by name, for every route that uses them
maxRoutesMost routes per run (default 100)
serverHow to start the app: { command: 'npm run preview', port: 4173, timeout: 120 }
widths{ min, max, step } in CSS pixels
ignore, detectorsLeave elements out, turn checks off or change their severity
failOnExit 1 at error, warning, info or none
visiontrue to add a vision model's opinion, or { model, provider, widths }
fixThe model breakhound fix uses: { provider: 'ollama', model: 'qwen2.5-coder' }
browsersEngines to check in: ["chromium", "webkit", "firefox"] (default Chromium only)
statesMost menus, dialogs, tabs and expandable sections to open per page (default 5), or false
concurrencyBrowser tabs to use at once (default half your CPU cores, up to 4)
memoryLimitMost memory the dev server and browser may use together, e.g. "6GB", "50%" or "off" (default 60% of your memory)

You can also mark elements in your markup:

html
<div data-breakhound-ignore>...</div>                      <!-- every check -->
<div data-breakhound-ignore="overlap small-tap-target">...</div>

Free and open source, MIT licensed.