Skip to content

chore: Add web-ext to wxt-demo and analytics for development - #2663

Merged
nishu-murmu merged 1 commit into
wxt-dev:mainfrom
MannXo:chore/2662-web-ext-dev-deps
Oct 13, 2026
Merged

nishu-murmu merged 1 commit into
wxt-dev:mainfrom
MannXo:chore/2662-web-ext-dev-deps

Conversation

@MannXo

@MannXo MannXo commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds web-ext as a devDependency to wxt-demo and analytics, the two packages that run wxt in dev. It goes in the root catalog at ^10.5.0, and packages/wxt now uses catalog: too, so all three stay on one version.

Until now the demos only opened the browser because wxt's runner resolves web-ext from packages/wxt/node_modules, where it's a devDependency of wxt itself. This makes it explicit.

Developer mode needs nothing else. web-ext 10 sets extensions.ui.developer_mode: true by default and merges WXT's chromiumPref on top.

On pinning, Chrome reads extensions.pinned_extensions from the profile, and it works through chromiumPref:

export default defineWebExtConfig({
  chromiumPref: {
    'extensions.pinned_extensions': ['<extension id>'],
  },
});

The catch is the ID. For an unpacked extension it's derived from the absolute path of the output directory (sha256 of the path, first 32 hex chars mapped 0-f to a-p), so it's different on every machine and can't be committed as a constant. I left it out of this PR. If you want it, the runner could compute the ID from outDir and pin the dev extension by default. Happy to open that separately. I've only verified the ID formula on macOS so far.

Manual Testing

bun run --filter wxt-demo dev on Chrome 155 (macOS), then read the temporary profile's Default/Preferences:

  • extensions.ui.developer_mode is true
  • with a local web-ext.config.ts setting pinned_extensions to the computed ID, the ID matches the one Chrome assigned and stays in pinned_extensions after load
  • without it, pinned_extensions is unset

I checked the prefs, not the toolbar visually.

bun ci, bun run buildc all, bun run check, demo build:all and wxt zip, and bun run test all pass.

Related Issue

This PR closes #2662

@netlify

netlify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit a4b55a2
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6acceeb8ae80234736fce235
😎 Deploy Preview https://deploy-preview-2663--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f67ba17e-e7a2-42bc-a7b2-0ec697d9e38f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added pkg/analytics Includes changes to the `packages/analytics` directory pkg/wxt Includes changes to the `packages/wxt` directory pkg/wxt-demo Includes changes to the `packages/wxt-demo` directory labels Oct 12, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2663

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2663

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2663

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2663

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2663

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2663

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2663

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2663

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2663

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2663

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2663

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2663

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2663

wxt

npm i https://pkg.pr.new/wxt@2663

commit: a4b55a2

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.63%. Comparing base (c1b8185) to head (a4b55a2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2663      +/-   ##
==========================================
- Coverage   79.68%   79.63%   -0.05%     
==========================================
  Files         138      138              
  Lines        4111     4111              
  Branches      943      943              
==========================================
- Hits         3276     3274       -2     
- Misses        737      738       +1     
- Partials       98       99       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nishu-murmu
nishu-murmu merged commit f7786be into wxt-dev:main Oct 13, 2026
21 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

@PatrykKuniczak

PatrykKuniczak commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

2 Approvals, but it doesn't work for me(on MacOS) :(

As far, as i've went with Copilot, that's problem with Chrome, it rejects web-ext request for change browser to "dev_mode" 😞

Even:

'extensions.ui.developer_mode': true,

doesn't solve issue/

@MannXo Are you want to try to figure it out?

Reference: mozilla/web-ext#3664

@nishu-murmu

Copy link
Copy Markdown
Collaborator

I don't know man, I only use Windows and Linux, worked for me on both!

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

I don't know man, I only use Windows and Linux, worked for me on both!

Maybe i've done sth wrongly.
Are you able to share me your working wxt.config?

@nishu-murmu

Copy link
Copy Markdown
Collaborator

I don't know man, I only use Windows and Linux, worked for me on both!

Maybe i've done sth wrongly. Are you able to share me your working wxt.config?

It's the default config.
I checkout using gh pr checkout 2663 and ran locally.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

I don't know man, I only use Windows and Linux, worked for me on both!

Maybe i've done sth wrongly. Are you able to share me your working wxt.config?

It's the default config. I checkout using gh pr checkout 2663 and ran locally.

I've checked main, because it was merged.
I'll check it again.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@nishu-murmu Have you, "Dev mode" enabled, after bun --filter wxt-demo dev?
Zrzut ekranu 2026-10-17 o 09 19 05

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@nishu-murmu Copilot found, that's issue with web-ext.
I've fixed it and you can see it line above, because i've mentioned this PR.

But i'll edit related issue also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/analytics Includes changes to the `packages/analytics` directory pkg/wxt Includes changes to the `packages/wxt` directory pkg/wxt-demo Includes changes to the `packages/wxt-demo` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add web-ext for examples, for development purposes

4 participants