Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@types/webextension-polyfill breaks firefox mv3 builds #1185

Open
5 tasks done
maxtheaxe opened this issue Nov 18, 2024 · 1 comment
Open
5 tasks done

@types/webextension-polyfill breaks firefox mv3 builds #1185

maxtheaxe opened this issue Nov 18, 2024 · 1 comment
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug

Comments

@maxtheaxe
Copy link

Describe the bug

It's possible I missed this in the documentation somewhere, but I just tried to build my firefox extension for manifest v3 and realized that the built extension was still converting browser.action to browser.browserAction. Once I switched to @types/chrome, the built background.js no longer used browserAction, solving my issue.

If nothing else, even if this gets insta-closed, hopefully this will make it more searchable for future users.

Reproduction

browserAction-issue.zip (contains builds from both versions)

Steps to reproduce

Run wxt build -b firefox while using @types/webextension-polyfill.

System Info

System:
  OS: Linux 6.9 Pop!_OS 22.04 LTS
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
  Memory: 35.42 GB / 62.51 GB
  Container: Yes
  Shell: 5.1.16 - /bin/bash
Binaries:
  Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
  npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm
  pnpm: 9.13.2 - ~/.local/share/pnpm/pnpm
npmPackages:
  wxt: ^0.19.13 => 0.19.16

Used Package Manager

pnpm

Validations

@maxtheaxe maxtheaxe added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label Nov 18, 2024
@aklinker1
Copy link
Collaborator

Hmm, looking at the files you provided, both have action in the manifest, not browser_action, so the manifest looks fine.

You said there was a problem with your background... just installing some type-only packages shouldn't have any effect on the build output. Did you also switch to extesionApi: 'chrome'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug
Projects
None yet
Development

No branches or pull requests

2 participants