webextensions-examples
webextensions-examples copied to clipboard
Example of generating a manifest for both Firefox and Chrome
A key point of the WebExtensions API is building cross-platform extensions. However, the manifest is one file that differs significantly between Firefox and Chrome so it's inevitable that you'll need to ship a separate manifest for each.
It would be great to provide an example of this, perhaps one similar to this method of using webpack to copy a platform specific manifest. The downside to this method is that many details are duplicated between each manifest. A better approach would be to render a manifest using a template. I think webpack would support that.
@kumar303 Sure? look at this https://developer.mozilla.org/de/Add-ons/WebExtensions/manifest.json for "webextensions api" ! or am I wrong?
However, the manifest is one file that differs significantly between Firefox and Chrome so it's inevitable that you'll need to ship a separate manifest for each.
Well, they don't differ significantly but as I recall there are certain things you could put in a Firefox manifest that will throw errors (or at least warnings) in Chrome. One example is the gecko ID.
@kumar303 which properties (manifest.json) for firefox are mandatory? is there any resources?
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json https://developer.chrome.com/extensions/manifest
@yfdyh000 i saw this tables (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json) but overlooked the differs. Thank you :)
No activity within the last three years, closing.