Extension.js is a CLI framework for building Chrome, Edge, Firefox, and Safari extensions from one codebase. It provides hot reload, manifest filtering, and store-ready packaging without hand-rolled bundler configs.
Overview
Extension.js targets teams that ship browser extensions across several engines without maintaining a separate build pipeline for each store. A single manifest can carry browser-prefixed keys that compile into per-target output for Chromium, Gecko, and Safari variants.
Development mode watches popups, options pages, content scripts, and service workers. Hot module replacement applies where safe, and targeted reloads re-inject only changed content script entries instead of reloading the whole extension. Manifest V3 is the default, with adapters handling browser-specific background and permission shapes.
The toolchain supports TypeScript, React, Vue, Svelte, and Preact in extension contexts. Production builds can emit zipped artifacts aimed at Chrome Web Store, Edge Add-ons, and Firefox AMO submission, while Safari builds on macOS route through Xcode’s web extension converter.
The CLI can download isolated browser binaries for local testing, accept custom Chromium and Gecko binary paths, and attach optional source maps or source bundles for store review. It plugs into existing extensions as a dev dependency with npm, pnpm, yarn, bun, or deno.
Key features
- Single manifest for multiple browsers
- Hot reload for extension pages and scripts
- Manifest V3 by default
- Store-ready zip packaging
- React, Vue, Svelte, and Preact templates
- Managed optional browser binaries
- Environment values per browser and mode
- Zero-config CLI workflows
Use cases
- Cross-browser extension products
- Migrating from custom webpack or Vite setups
- Manifest V3 store submissions
- Safari extensions on macOS via Xcode
- Teams standardizing extension CI builds