4 ms·
Unless something changed in the past 3 weeks, you can still upload manifest V2 plugins to chrome, I uploaded one a few weeks ago. Otherwise, what I did to supp
by azeirah 5y ago
Unless something changed in the past 3 weeks, you can still upload manifest V2 plugins to chrome, I uploaded one a few weeks ago.
Otherwise, what I did to support v2 for firefox and v3 for chrome is fairly straightforward.
You write your code and compile it all with webpack into a single file, all you have to do is write two manifest files which are 70% the same.
There are some incompatibilities between v2 and v3, like v3 having promises for the extension api. I wrote wrappers for the non-promise versions myself (I'm sure there are packages that do this for you). Webpack takes care of a lot of the other inconsistencies like module support.
Also note that you should 100% make sure that you follow the guidelines for how to structure a plugin for the v3 version, ie that it is event based. Your background scripts will be shut down randomly every now and then and you will get insanely buggy code when running in v3 if you don't follow the guidelines strictly.
For now, I just ship v2 to both firefox and chrome, it's easiest for me. Note though I have had this plugin for a couple years now, maybe it's not possible to create _new_ plugins with v2.
- falafelite 5y agoYeah there has been a recent change: “As of January 17, 2022 Chrome Web Store has stopped accepting new Manifest V2 extensions. We strongly recommend that new extensions target Manifest V3.”[0] I guess I made the mistake of developing for Firefox first with their documentation/guides. I am using rollup and the polyfill plugin per some suggestions, but it certainly isn’t generating anything compatible for v3, and I believe it breaks on the background script vs. worker thing. [0] https://developer.chrome.com/docs/extensions/mv2/ https://developer.chrome.com/docs/extensions/mv2/
- insin 5y agoUrgh, not accepting new V2 extensions is terrible, I didn't realise they'd done that. Up until now I've just been publishing the exact same extension for Firefox/Chrome/Edge (and also as a user script), as Firefox supports using the global `chrome` object for everything I've needed it for. The only browser-specific stuff has been targeting different browsers with CSS in the options page to make it blend in with the default light and dark mode themes in Firefox/Chrome/Edge. Looks like I'm in the same boat the next time I need a new extension.
- gabrielsroka 5y ago> Existing Manifest V2 extensions that have previously been published publicly will not be affected by this change and updates to those already-published extensions will continue to be accepted. Source: email dated 2021-12-12
- insin 5y agoChrome won't run V2 extensions in less than a year from now: https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/ https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/
- azeirah 5y agoOh that's sad. Only good thing about this is that Mozilla is working on v3 support. > Manifest v3 is a large platform project, and some parts of it will take longer than others to implement. As of this writing, we are hoping to complete enough work on this project to support developer testing in Q4 2021 and *start accepting v3 submissions in early 2022.* This schedule may be pushed back or delayed due to unforeseeable circumstances. Unfortunately, this article was written in May 2021. As far as I can see there's no update to this article yet, so we don't know what "early" 2022 means. > https://blog.mozilla.org/addons/2021/05/27/manifest-v3-update/ https://blog.mozilla.org/addons/2021/05/27/manifest-v3-updat...