Package Exports
- extension
Readme
Extension.js

The cross-browser extension framework.

- Create A New Extension — How to create a new extension.
- Get Started Immediately — Get work done in no time.
- Start From A Template — Start with your favorite tool.
- I have An Extension — Use only specific parts of Extension.js.
Extension.js makes it very easy to develop cross-browser extensions.
Developers use it due to its fast builds, simple interface, and zero-configuration setup.
Create A New Extension
npx extension create my-extension
cd my-extension
npm run dev
https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a-72c489672586
Web Standards and Framework Support
For a preview of extensions running these technologies, see the templates website.
ESNext latest |
TypeScript latest |
WASM latest |
React 18+ |
Vue 3+ |
Angular 👋 |
Svelte 5+ |
Solid 👋 |
Preact 10+ |
👋 = PR Welcome!
Get Started Immediately
Use Chrome to start developing an extension from Chrome Extension Samples
See the example below where we request the sample page-redder from Google Chrome Extension Samples.
npx extension dev https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/sample.page-redder --browser=edge
https://github.com/cezaraugusto/extension/assets/4672033/ee221a94-6ec7-4e04-8553-8812288927f1
I have An Extension
https://github.com/cezaraugusto/extension/assets/4672033/48694a23-b7f1-4098-9c5d-eff49983739c
If you have an existing extension which is using a package manager, you can install the Extension.js package and manually create the scripts used to run your extension.
Step 1 - Install extension as a devDependency
npm install extension --save-dev
Step 2 - Link your npm scripts with the executable Extension.js commands
{
"scripts": {
"build": "extension build",
"dev": "extension dev",
"preview": "extension preview"
},
"devDependencies": {
// ...other dependencies
"extension": "latest"
}
}
Done. You are all set!
- To develop the extension, run
npm run dev
. - To build the extension in production mode, run
npm run build
. - To visualize the extension in production mode, run
npm run build
andnpm run preview
.
Using a specific browser for development
Desktop Browsers
Chrome ✅ |
Chromium ☑️ |
Edge ✅ |
Firefox ✅ |
Opera ☑️ |
Safari ⛔️ |
The browsers listed above represent those with official extension stores. Note that Chromium-based browsers (like Arc, Brave, Vivaldi, and many others) are theoretically supported through the Chrome/Chromium compatibility layer.
Mobile Browsers
Firefox (Android) ⛔️ |
Safari (iOS) ⛔️ |
License
MIT (c) Cezar Augusto and the Extension.js authors.