There are cases when a feature is desired in a browser but not in the other browser, say using background.service_worker for Chrome and background.scripts for Firefox.
The easier route is having multiple manifest.json files specific for browsers (like manifest.edge.json). I'd like to avoid this for now.
The solution that comes to mind is having some sort of prefix to manifest fields, which would be handled by the CompatPlugin. Like:
{
// Applies to Chrome only
"chrome:side_panel": "...",
"background": {
// Applies to all Chromium-based browsers
"chromium:service_worker": "sw.js",
// Applies to Firefox
"firefox:scripts": ["bg.js"]
}
}
Chrome would understand the manifest.json as:
{
// Applies to Chrome only
"side_panel": "...",
"background": {
// Applies to all Chromium-based browsers
"service_worker": "sw.js"
}
}
There are cases when a feature is desired in a browser but not in the other browser, say using
background.service_worker
for Chrome andbackground.scripts
for Firefox.The easier route is having multiple manifest.json files specific for browsers (like manifest.edge.json). I'd like to avoid this for now.
The solution that comes to mind is having some sort of prefix to manifest fields, which would be handled by the CompatPlugin. Like:
Chrome would understand the manifest.json as:
Firefox: