plasmo
plasmo copied to clipboard
[RFC] Manifest override by special target
How do you envision this feature/change to look/work like?
Add manifest_specific configuration to support override the manifest for specific browser targets.
What is the purpose of this change/feature? Why?
For example: my extension needs to declare the webRequestBlocking permission in firefox, but not in chrome, because declaring it in chrome mv3 results in the error
(OPTIONAL) Example implementations
Configuration example:
{
"manifest": {
"host_permissions": [
"http://*/*",
"https://*/*"
],
"permissions": [
"downloads",
"cookies"
]
},
"manifest_specific":{
"firefox-mv2": {
"permissions": [
"downloads",
"cookies",
"webRequest",
"webRequestBlocking"
]
}
}
}
Finally firefox-mv2 Firefox get the merged manifest.json:
{
"host_permissions": [
"http://*/*",
"https://*/*"
],
"permissions": [
"downloads",
"cookies",
"webRequest",
"webRequestBlocking"
]
}
(OPTIONAL) Contribution
- [X] I would like to contribute to this RFC via a PR
Verify canary release
- [X] I verified that the issue exists in
plasmocanary release
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate problems.
Same issue for me. I want to declare the sidebar_action key which works for firefox but throws an error in chrome: