Resolve background scripts defined in a WebExtension manifest file
Allows a WebExtension to link to background scripts defined the manifest file even after compilation. If your webpack config needs to copy the extension manifest to the output folder, this plugin ensures background scripts point to the right path.
How it works
Before compilation
Directory
./yourWebExtension/
├── public
│ └── manifest.json
└── src
└── background.js
Manifest
After compilation
Directory
./yourWebExtension
├── background.js
└── manifest.json
Manifest
Usage
See webpack.config.js example.
const WebpackResolveBackgroundScript = moduleexports plugins: /* <path-to-dist-manifest-file> */
API
new WebpackResolveBackgroundScript(manifestDistFilePath)
manifestDistFilePath
Type: string
Path to your webExtension manifest file after compilation.
License
MIT (c) Cezar Augusto.