Hacker News new | past | comments | ask | show | jobs | submit login

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)

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.




> 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

> 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: