7 ms·
One of the main purposes was to make developers lives easier so you can have a single codebase instead of juggling with browser specific APIs and configs. Other
by SoKamil 3y ago
One of the main purposes was to make developers lives easier so you can have a single codebase instead of juggling with browser specific APIs and configs. Otherwise many developers would just go with a market default.
- p1mrx 3y agoThe biggest problem I found is that Chrome Manifest V3 requires background.service_worker (they removed background.scripts), while Firefox Manifest V3 requires background.scripts (they never implemented background.service_worker) You can generally have a common background.js file, maybe with a few conditionals, but the manifest.json file needs to be different for Chrome and Firefox. I decided to keep two foo-manifest.json versions in a manifest/ subdirectory, and copy one to ../manifest.json depending on which browser I'm testing. It's a bit tedious. Not sure if a better solution exists.
- dotproto 3y ago> The biggest problem I found is that Chrome Manifest V3 requires background.service_worker (they removed background.scripts), while Firefox Manifest V3 requires background.scripts (they never implemented background.service_worker) It's a work in progress: https://bugzilla.mozilla.org/show_bug.cgi?id=1609923 https://bugzilla.mozilla.org/show_bug.cgi?id=1609923 > I decided to keep two foo-manifest.json versions in a manifest/ subdirectory, and copy one to ../manifest.json depending on which browser I'm testing. It's a bit tedious. Not sure if a better solution exists. Personally, I favor having a build step that produces the final manifest. The basic idea is that you have a common manifest.json + paired down browser-specific files that override the general settings as necessary. It's not a perfect solution, but I think it makes maintenance a bit easier.