You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic because manifest_version is set to 3 while the web_accessible_resources key is formatted as per v2.
This leads to not being able to import the extension in Firefox, as it is expecting a true v3 manifest structure.
Reproduction
#!/usr/bin/env bash
mkdir wxt_tmp_repro
cd wxt_tmp_repro
# Initialize the Bun project (creates package.json with default content)
bun init -y
# Install wxt as a dev dependency
bun i -D wxt
# Insert the "scripts" block after the "name" property in package.json.# This uses sed to append the block immediately after the line matching "name":
sed -i '/"name":/a\ "scripts": {\ "dev": "wxt",\ "dev:firefox": "wxt -b firefox",\ "build": "wxt build",\ "build:firefox": "wxt build -b firefox",\ "zip": "wxt zip",\ "zip:firefox": "wxt zip -b firefox",\ "postinstall": "wxt prepare"\ },' package.json
# Create the entrypoints directory if it doesn't exist and add the background script.
mkdir -p entrypoints
cat > entrypoints/background.js << 'EOF'export default defineBackground(() => { console.log('Hello world!');});EOF# Create the wxt.config.ts file with the provided content.
cat > wxt.config.ts << 'EOF'import { defineConfig } from 'wxt';// See https://wxt.dev/api/config.htmlexport default defineConfig({ manifest: { manifest_version: 3, name: "Test repro", version: "1.0", description: "Description", web_accessible_resources: [ { resources: ["images/*.png"], matches: [ "<all_urls>" ] } ] },});EOF# Build for Firefox
bun run build:firefox
# Output the generated manifest.json to the console
cat .output/firefox-mv2/manifest.json
I can add a warning and make sure to ignore manifest.manifest_version. But basically, you're not setting the manifest version in the correct location. You should set manifestVersion instead:
Describe the bug
Creating a new project with manifest-v3 and building the extension for firefox outputs a manifest with an incorrect v2 format
This is problematic because manifest_version is set to 3 while the web_accessible_resources key is formatted as per v2.
This leads to not being able to import the extension in Firefox, as it is expecting a true v3 manifest structure.
Reproduction
Steps to reproduce
Run the above repro as
bash repro.sh
System Info
Used Package Manager
bun
Validations
The text was updated successfully, but these errors were encountered: