Manifest
Customize build behavior for extension manifest.
In your build configuration specify path to the manifest file:
1 2 3 |
|
The file will be renamed to manifest.json
during build regardless of its original name.
Customizing manifests for different target browsers
There are two strategies for customizing the manifest contents per target browser:
- Specify browser-specific keys in single manifest file
- Specify multiple build configurations, each with different manifest file.
Browser specific keys in single manifest
Using this strategy, the project contains single manifest. In manifest.json:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Then run the build command specifying the target platform:
1 2 |
|
The build will then combine all common manifest elements with those specified for the target platform.
When building cross-browser extensions, most browsers can reuse the same manifest. Therefore, these two targets are typically sufficient to generate the desired manifests for multiple target browsers. However, if this strategy is insufficient, see the next option.
Multiple build configurations
Create multiple build configuration files:
chrome-config.json:
1 2 3 |
|
firefox-config.json:
1 2 3 |
|
Using this strategy, run the build command specifying path to config file explicitly:
1 2 |
|