Skip to content

Config options ​

Every option of edgefit.config.ts. For examples and explanations, see Configuration.

ts
import { defineConfig } from 'edgefit';

export default defineConfig({
  targets: ['workerd'],
  entry: 'src/index.ts',
  workerd: { compatibilityDate: '2026-04-01', compatibilityFlags: ['nodejs_compat'] },
  bun: { version: '1.4.4' },
  deno: { configFile: 'deno.json' },
  ignore: [{ package: 'chokidar', reason: 'dev server only' }],
  levels: { mocked: 'error', unknown: 'warning' },
  conditions: [],
});

Top level ​

OptionTypeDefaultDescription
targetsTargetKey[]['workerd']workerd, bun, deno, deno-deploy, netlify-edge, vercel-edge. Must not be empty
entrystring | string[]each target'sEntry points or globs, relative to the root. Applies to every target
ignoreIgnoreRule[][]Findings to leave out of the report
levelsPartial<Record<Category, Level>>see belowLevel per category: error, warning or off
conditionsstring[][]Extra export conditions, checked before the target's own
workerdWorkerdOptionsCloudflare Workers settings
bunBunOptionsBun settings
denoDenoOptionsSettings for deno and deno-deploy
netlifyNetlifyOptionsSettings for netlify-edge
envEnvOptionsConstants a bundler replaces, see below

ignore ​

FieldTypeDescription
packagestringPackage name. . means your own code
apistringAPI as shown in reports, such as node:fs.watch. A trailing * matches a prefix
reasonstringWhy. Not used by edgefit, but the next reader will thank you

Each rule needs package, api, or both.

levels ​

CategoryDefault
unsupportederror
mockederror
mismatchwarning
webwarning
unknownwarning

workerd ​

FieldTypeDefault
compatibilityDatestringwrangler compatibility_date, then the data's
compatibilityFlagsstring[]wrangler compatibility_flags, then the data's
wranglerConfigstring | falsewrangler.jsonc, wrangler.json or wrangler.toml in the root. false skips it

bun ​

FieldTypeDefault
versionstringpackageManager: "bun@x", then .bun-version

deno ​

FieldTypeDefault
configFilestring | falsedeno.json, then deno.jsonc in the root. false skips it

netlify ​

FieldTypeDefault
configFilestring | falsenetlify.toml in the root. false skips it and its import map

env ​

FieldTypeDefaultDescription
NODE_ENVstringby targetWhat process.env.NODE_ENV is replaced with. Code the value rules out is not checked. production on workerd, netlify-edge and vercel-edge; not fixed on bun, deno and deno-deploy

Validation ​

The config is validated when it is loaded. Unknown targets, unknown categories, invalid levels and ignore rules without package or api are rejected with exit code 2 and a message naming the problem.

Released under the MIT License.