-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manifest V3 breaks support for Firefox and Manifest V2 is no longer supported in Chrome #51
Comments
This is also complicated by the story around Service Workers and Firefox's Event Pages:
|
Here's an approach we could take with this:
The bigger problem is ensuring backwards compatibility in the background script to accommodate the various browser API support. This Hacker News comment has a nice idea to use |
|
Another approach would be to use CopyWebpackPlugin or similar to copy the files individually depending upon the browser target. |
A {
"manifest_version": 2,
"__chrome__manifest_version": 3,
"name": "Chrome Extension Starter",
"description": "A Chrome Extension starter kit",
"version": "1.0.0",
"browser_action": {
"default_icon": {
"16": "icon-16.png",
"48": "icon-48.png",
"128": "icon-128.png"
},
"default_popup": "popup.html"
},
"__chrome__browser_action": {},
"__chrome__action": {
"default_icon": {
"16": "icon-16.png",
"48": "icon-48.png",
"128": "icon-128.png"
},
"default_popup": "popup.html"
},
"background": {
"scripts": ["js/backgroundPage.js"]
},
"__chrome__background": {
"service_worker": "js/backgroundPage.js"
},
"icons": {
"16": "icon-16.png",
"48": "icon-48.png",
"128": "icon-128.png"
},
"__chrome__host_permissions": ["https://*/*"],
"permissions": [
"tabs",
"activeTab",
"notifications",
"scripting",
"https://*/*"
],
"__chrome__permissions": ["notifications", "scripting", "storage", "tabs"]
} |
@joshsmith Thanks for opening this issue and leaving all the notes - agreed, we should address this. I'm going to take a few days to review some options and identify what I think best path will be moving forward for both the short-term and long-term - I'll post an update here when I've had a chance to get more traction on the problem 👍 |
Here's another interesting approach: https://github.com/quolpr/react-vite-webext/blob/main/src/manifest.ts Obviously this is using Vite, but still worth learning from. |
Any progress on this? Interested in using this starter kit but hitting this issue out of the box... |
So as is I cant use it in Firefox? Also content_scripts is missing? |
My original comment can be found in #46.
While the new
manifest.json
in #46 was tested in Chrome, the Manifest V3 will not work in Firefox:This breaks cross-browser compatibility for this starter for at least Firefox. Brave apparently plans to continue Manifest V2 support past sunset.
This is complicated further by the fact that new Manifest V2 extensions are already not supported by Chrome.
I think we need a new approach to handle how
manifest.json
is generated for thedist
, perhaps on a per-browser basis?The text was updated successfully, but these errors were encountered: