Skip to content

Unable to add page_action to Firefox MV3 #2194

@smashedr

Description

@smashedr

Describe the bug

Firefox MV3 still uses page_action but WXT strips this in every step and provides no way to include it.

I have tried both adding page_action to both the main manifest section and the manifestGenerated hook, but in all cases it gets stripped.

  hooks: {
    'build:manifestGenerated': (wxt, manifest) => {
      console.log('wxt.config.browser', wxt.config.browser)
      if (wxt.config.browser === 'firefox') {
        manifest.page_action = {
          default_popup: 'popup.html',
          default_icon: icons,
          show_matches: ['*://*/*'],
        }
      }
    },
  },

At a glance, in searching for an existing issue, I found what my be a related issue:

Reproduction

I can't find any way to get the page_action to be included in the Firefox MV3 manifest.json.

If you need a project this has the page_action manifest keys: https://github.com/smashedr/wxt-extension

Steps to reproduce

wxt -b firefox --mv3
wxt build -b firefox --mv3

The page_action will be stripped int he manifest.json in both cases.

System Info

Binaries:
    Node: 24.11.0 - C:\Apps\node-v24.11.0-win-x64\node.EXE
    Yarn: 1.22.22 - C:\Apps\node-v24.11.0-win-x64\yarn.CMD
    npm: 11.11.1 - C:\Apps\node-v24.11.0-win-x64\npm.CMD
    pnpm: 10.28.0 - C:\Apps\node-v24.11.0-win-x64\pnpm.CMD

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions