feat: Verify Firefox MV2 build target and add web-ext example config#23
Open
skid-dev wants to merge 1 commit into
Open
feat: Verify Firefox MV2 build target and add web-ext example config#23skid-dev wants to merge 1 commit into
skid-dev wants to merge 1 commit into
Conversation
WXT already normalises the MV3 manifest (host_permissions, action, web_accessible_resources) into MV2 shape, and the chrome.scripting API used by the background worker is supported in Firefox 102+. No source changes needed — wxt build -b firefox produces a working MV2 bundle. - Add Firefox MV2 build step to CI alongside the Chrome MV3 build so the Firefox target stays green on every push. - Suppress the AMO data-collection-permissions warning; the consent requirement only applies to brand-new AMO listings. - Add web-ext.config.example.ts as a template for the developer-local web-ext.config.ts (already gitignored) that customises browser binaries and start URLs. - Document the Firefox dev workflow and the web-ext.config copy step in the README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wxt build -b firefoxproduces a working Firefox MV2 bundle out of the box — WXT already normaliseshost_permissions,action→browser_action, andweb_accessible_resourcesautomatically, andchrome.scripting.*is supported in Firefox 102+.web-ext.config.example.tsas a template for the developer-local (gitignored)web-ext.config.ts, plus a Firefox-development section in the README.What WXT handled without source changes
.output/firefox-mv2/manifest.json)host_permissions: ["<all_urls>"]permissions: [..., "<all_urls>"]action: {...}browser_action: {...}web_accessible_resources: [{ resources, matches }]web_accessible_resources: [string, ...]background.service_workerbackground.scriptspermissions: [..., "scripting", ...]browser.scriptingin MV2commandsTest plan
npm install --ignore-scriptsnpx wxt preparenpx wxt build— Chrome MV3 build still passes (regression check)npx wxt build -b firefox— Firefox MV2 build succeeds with no warningsnpx wxt zip -b firefox— produces.output/schoolbox-chrome-extension-1.3.0-firefox.zipnpx tsc --noEmit— typecheck clean🤖 Generated with Claude Code