Support vendor-specific manifest.json #416
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
As noted in #398 Firefox supports additional WebExtension APIs, but Chrome throws an error if we include them in
manifest.json
.TL;DR this PR will make it possible to provide additional features per vendor in a safe way.
Changes
Manifest is Assembled During Build
This change splits manifest into common and vendor-specific files:
Behaviour of
npm run build
does not change, but there are new commands inbundle:*
namespace that enable developer to quickly switch manifest between different targets and (re)create a valid bundle for a specific vendor.Build Creates Multiple Bundles
Right now we have two targets enabled by default.
A
generic
one for Chrome and Brave andfirefox
for Firefox: