how do you build a single browser extension and then have compatible firefox/chrome files that are different in what they require for their own thing.
i mean currently we are doing terribly stupid thing. two folders /firefox and /chrome and do the updates manually in both. there should be something easier.
The only really difference sometimes is in the manifest. If you target the webextension api and use the Mozilla poly fill library, your code base does not need to be duplicated at all.
It adds the benefit of being able to use all API calls in a promise based manner instead of needing to use callbacks.
Edit:
To give it a bit more context (although you can find that in other comments I left under this post).
Which if included allows you to swap out `chrome` callback based calls for promise based `browser` calls.
So instead of using `chrome.extension.api.call(() => { // callback})` you do something like `await browser.extension.api.call()` with the same results working in both browsers.
Then the only thing where you still need some separation is for the manifest as some keys are Firefox specific and vice versa.
i mean currently we are doing terribly stupid thing. two folders /firefox and /chrome and do the updates manually in both. there should be something easier.