Everyone is welcome to contribute to WXT!
If you are changing the docs or fixing a bug, feel free to fork and open a PR.
If you want to add a new feature, please create an issue or discussion first so we can decide if the feature is inline with the vision for WXT.
This project uses Conventional Commits to automate versioning. If you're a new contributor, don't worry about this. When you open a PR, a maintainer will change the PR's title so it's in the style of conventional commits, but that's all.
Maintainers, commits to the main
branch (either directly or via PRs) must be valid conventional commits.
WXT uses pnpm
, so make sure you have it installed.
corepack enable
Then, simply run the install command:
pnpm i
Here are some helpful commands:
# Build WXT package
pnpm build
# Build WXT package, then build demo extension
cd demo
pnpm build
# Build WXT package, then start the demo extension in dev mode
cd demo
pnpm dev
# Run unit and E2E tests
pnpm test
# Start the docs website locally
pnpm docs:dev
WXT has unit and E2E tests. When making a change or adding a feature, make sure to update the tests or add new ones.
To run tests for a specific file, add the filename at the end of the test command:
pnpm test manifest-contents
Unit and E2E tests are ran together via Vitest workspaces.
If you want to manually test a change, you can modify the demo project for your test, but please don't leave those changes committed once you open a PR.
Each directory inside templates/
is it's own standalone project. Simply cd
into the directory you're updating, install dependencies with npm
(NOT pnpm
), and run the relevant commands
cd templates/vue
npm i
npm run dev
npm run build
Note that templates are hardcoded to a specific version of wxt
from NPM, they do not use the local version. PR checks will test your changes against the templates, but if you want to manually do it, update the package.json dependency:
"devDependencies": {
"typescript": "^5.3.2",
"vite-plugin-solid": "^2.7.0",
- "wxt": "^0.8.0"
+ "wxt": "../.."
}
Then run npm i
again.
To add a template, copy the vanilla template and give it a new name.
cp -r templates/vailla templates/<new-template-name>
That's it. Once your template is merged, it will be available inside wxt init
immediately. You don't need to release a new version of WXT to release a new template.