For example, I don't have to declare tabs permissions to use chrome.tabs.sendMessage
But in prod mode, If I don't declare tabs permission I can't use chrome.tabs.sendMessage
I must declare it in package.json:
"permissions": [
"tabs"
]
There are also things like having to declare contextMenus in order to use chrome.contextMenus.create under prod, etc.
But under dev I can just use it without declaring it.
"permissions": [
"contextMenus"
]
šššššššš
So this creates a problem, everything works fine with my extension in the dev environment, but in the prod environment there are all sorts of problems because I don't know about this mechanism of plasmo, and I have to declare the relevant permissions in the prod environment to be able to use it.
Is this a bug or is the framework designed so ?
I suggest to keep all the permissions the same whether it's dev or prod, so that you can find the problem as early as possible under dev!
Or the framework can do a check if you use code without declared permissions and give you the necessary hints.
Thanks
Code of Conduct
[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate problems.
In dev mode, I seem to have all the permissions, and I don't have to declare them separately in package.json.
For example, I don't have to declare tabs permissions to use chrome.tabs.sendMessage
But in prod mode, If I don't declare tabs permission I can't use chrome.tabs.sendMessage
I must declare it in package.json:
There are also things like having to declare contextMenus in order to use chrome.contextMenus.create under prod, etc.
But under dev I can just use it without declaring it.
šššššššš
So this creates a problem, everything works fine with my extension in the dev environment, but in the prod environment there are all sorts of problems because I don't know about this mechanism of plasmo, and I have to declare the relevant permissions in the prod environment to be able to use it.
Is this a bug or is the framework designed so ?
I suggest to keep all the permissions the same whether it's dev or prod, so that you can find the problem as early as possible under dev!
Or the framework can do a check if you use code without declared permissions and give you the necessary hints.
Thanks
Code of Conduct