browserPath

browserPath specifies the executable paths for browsers used during addfox dev to open and load the extension.

Overview

  • Type: BrowserPathConfig
  • Default: undefined (uses system default paths)
  • Required: No

Chromium-based Browsers

The following Chromium-based browsers are supported:

BrowserConfig KeyDefault Path
Google ChromechromeAuto-detected
ChromiumchromiumAuto-detected
Microsoft EdgeedgeAuto-detected
BravebraveAuto-detected
VivaldivivaldiAuto-detected
OperaoperaAuto-detected
ArcarcAuto-detected

Configuration Example

// addfox.config.ts
export default defineConfig({
  browserPath: {
    chrome: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
    edge: "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
  },
});

Launch via CLI

pnpm
npm
yarn
bun
pnpm dev -- -b chrome
pnpm dev -- -b edge
pnpm dev -- -b brave

Firefox

Firefox uses the web-ext tool to manage extensions. The path configuration is the same:

export default defineConfig({
  browserPath: {
    firefox: "/Applications/Firefox.app/Contents/MacOS/firefox",
  },
});

Launch Firefox

pnpm
npm
yarn
bun
pnpm dev -- -b firefox
Info

Firefox development mode uses the web-ext tool. Extension reload is handled by web-ext, not Addfox's WebSocket.

Platform Examples

macOS

export default defineConfig({
  browserPath: {
    chrome: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
    edge: "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
    firefox: "/Applications/Firefox.app/Contents/MacOS/firefox",
  },
});

Windows

export default defineConfig({
  browserPath: {
    chrome: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
    edge: "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
  },
});

Linux

export default defineConfig({
  browserPath: {
    chrome: "/usr/bin/google-chrome",
    chromium: "/usr/bin/chromium-browser",
    firefox: "/usr/bin/firefox",
  },
});