Title: How do you avoid repeating code for, say, both a Firefox and Chrome extension? Chrome recently mandated that only manifest V3 extensions can be submit to their online store, and that introduces quite the number of breaking changes from V2 (even with the polyfill package). As far as I can tell, Firefox does not yet support V3 (I could be quite mistaken there).<p>As someone new to writing extensions and trying to write something for at least both Firefox and Chrome, how should I go about it? Or do I have to accept writing separate background.js files, separate manifest.json files, etc.?
Upvote: