Configuration reference

Every Addonova configuration option, grouped by section.

#

Addonova reads the nearest of these files, searching upward from the working directory:

  1. addonova.config.ts
  2. addonova.config.js
  3. addonova.config.mjs
  4. addonova.config.json

--config <path> overrides discovery. CLI flags override configuration values.

import { defineConfig } from 'addonova';

export default defineConfig({
  browsers: ['chrome', 'firefox'],
  srcDir: 'src',
  entrypointsDir: 'entrypoints',
  outdir: 'dist',
  publicDir: 'public',
  mode: 'production',
  manifest: {
    name: 'My Extension',
    version: '1.0.0',
  },
});

Top-level options

#
Option Type Default Section
entrypoints string, string[], object discovered Entrypoints
srcDir string src Entrypoints
entrypointsDir string entrypoints Entrypoints
browsers target[] or object ['chrome'] Browsers and manifest
manifest object or function {} Browsers and manifest
convertManifest boolean true Browsers and manifest
outdir string dist Build and output
publicDir string public Build and output
mode development or production production Build and output
minify boolean by mode Build and output
sourcemap boolean or mode by mode Build and output
browserApi mode or object external Build and output
webExt object {} webExt
plugins plugin[] [] Plugins, modules, hooks
modules module[] [] Plugins, modules, hooks
hooks object {} Plugins, modules, hooks
pack object {} Pack

Unknown keys

#

Top-level unknown keys are allowed so modules can read custom options through configKey. Unknown keys inside nested sections such as webExt and pack are rejected.

Edit this page on GitHub