Closed franciscolourenco closed 5 years ago
When the manifest is scaffolded with a content script, the activeTab permission is added to the manifest. This is a default based on google's docs on how to use content scripts. As it stands right now, there isn't really a one size fits all scaffold, and this was the lest opinionated option to add to your manifest out of the box.
What were you expecting to show up in the manifest file? Always possible something important is missing.
I was expecting the content_scripts
option. As you said they both options are ways of executing content scripts.
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["content_scripts/content.js"]
}
],
This would be quite permissive, but at the same time the scaffold already includes
"permissions": [
"<all_urls>",
"*://*/*"
]
If you keep it like it is, it would already be useful adding your explanation to the readme.
Closing this
On a new project, selecting the content script option during generation, the content-script option is missing from manifest.json.
https://github.com/reproducing/vue-cli-plugin-browser-extension-manifest-content-script/blob/master/src/manifest.json
EDIT: there is also some indentation issue in this line