react-typescript-web-extension-starter icon indicating copy to clipboard operation
react-typescript-web-extension-starter copied to clipboard

Update package.json scripts to define separate manifest.json files for Chrome and Firefox

Open aeksco opened this issue 5 years ago • 0 comments

Got this reply in an /r/react thread:

Nice. I kept looking and looking where you generate the different manifest.json files. But it looks like you used a combined one.

Be aware that there are slight differences in FF and Chrome supported extensions. So I had to keep separate manifest.json files for each browser.

The problem is that each of the browsers doesn't load the extension if the manifest contains invalid stuff that the other one supports ( e.g. optional permissions, or unsupported permissions )

I am on mobile now so difficult for me to diff. But you can see the subtle differences here :

https://github.com/stefanXO/Tab-Manager-Plus/blob/master/manifest.json

https://github.com/stefanXO/Tab-Manager-Plus/blob/master/manifest-firefox.json

There should be separate yarn build:firefox and yarn build:chrome scripts (instead of just having yarn build) that can copy a different source manfiest.json file to account for small variations between the two different browsers.

aeksco avatar Jan 27 '20 00:01 aeksco