Parcel plugin to use WebExtension manifest as an entry point (parcel@v2 and json5 supported)
npm install parcel-transformer-webextension --save-dev
Please add following configuration to .parcelrc
{
"transformers": {
"manifest.{json5,json}": ["parcel-transformer-webextension"]
},
"packagers": {
"manifest.json": "@parcel/packager-raw-url"
}
}
After installing and configuring the plugin, use WebExtension manifest.json as entry point:
parcel src/manifest.json5
Any manifest property (including nested) can be resolved as an asset(html/css/js/png/jpeg), all you need is to provide proper asset path to manifest property, for example:
// other manifest props
"browser_action": {
"default_icon": "assets/icons/icon48.png",
"default_popup": "action.html",
"default_title": "Action!"
}
Btw, the plugin adds json5
support, so comments and other json5 benefits can be used with WebExtension manifest file. Enjoy!
Apache 2.0