Skip to content

[Feature] Specify manifest.json path #2653

Open
@ffoodd

Description

@ffoodd

Reviving #1034.

Currently working on a manifest V2 → V3 migration, separate manifest files are needed for Firefox and Chromium based browsers:

  • background entry needs a service_worker string for Chromium, but a scripts strings array for Firefox ;
  • Firefox needs browser_specific_settings mostly to set gecko.id.

I currently have two manifests, and use npm scripts to temporary rename e.g. the Firefox manifest before packaging my extension. I can't see a workaround since browsers reject a manifest containing what they consider as invalid entries in the manifest file—but that's the only file that needs to be different. Content and background scripts, assets, images… are the same for Firefox and Chromium, so I definitely don't want to maintain a folder for both, with duplicate files all over.

That means I'm unable to use web-ext to either build or run my extension since I cannot specify the manifest file to use. I could keep going with temporarily renaming files before using web-ext (using pre npm script hooks), which I’d like to drop, obviously.

Could it make sense to handle this argument for web-ext CLI with the the upcoming MV3 era? And if not, I think it could be explained somewhere with some hints and how-to handle this, couldn't it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions