https://github.com/kaze-k/crx-pack-webpack-plugin
A webpack5 plugin to pack crx
https://github.com/kaze-k/crx-pack-webpack-plugin
browser-extention crx3 webpack-plugin webpack5 webpack5-plugin
Last synced: 3 months ago
JSON representation
A webpack5 plugin to pack crx
- Host: GitHub
- URL: https://github.com/kaze-k/crx-pack-webpack-plugin
- Owner: kaze-k
- License: mit
- Created: 2023-08-14T09:18:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T04:50:53.000Z (almost 2 years ago)
- Last Synced: 2024-12-21T12:35:56.399Z (6 months ago)
- Topics: browser-extention, crx3, webpack-plugin, webpack5, webpack5-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/crx-pack-webpack-plugin
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# crx-pack-webpack-plugin
A webpack5 plugin to pack crx, use [crx3](https://github.com/ahwayakchih/crx3) and support typescript.
## Usage
add the plugin:
``` js
yarn add crx-pack-webpack-plugin -D
```configure the plugin:
``` js
new CrxPackWebpackPlugin({
zip: true,
xml: true,
keyFile: "your-private-key.pem",
contentPath: "./build",
outputPath: "./release",
updateURL: "http://localhost:8080",
updateFilename: "update.xml",
name: "example-name",
autoClean: true,
})
```## Configuration Settings
| Option | Required | Type | Default | About |
|---|---|---|---|---|
| zip | no | boolean | true | provides a zip of the build files along with the CRX. |
| xml | no | boolean | true | provides a xml of the build files along with the CRX. |
| keyFile | yes | string | none | a private key required to update the extension. |
| contenPath | yes | string | none | location of build files. |
| outputPath | yes | string | none | where to export the built extension. |
| updateURL | no | string | "http://localhost:8000/" | where to find updates.xml |
| updateFilename | no | string | "update.xml" | filename for update.xml |
| name | no | string | "package" | the name of the built extension. |
| autoClean | no | boolean | false | whether to automatically empty files |## Alternatives
- [crx-webpack-plugin](https://github.com/johnagan/crx-webpack-plugin)
- [crx3-webpack-plugin](https://github.com/garrettlr/crx3-webpack-plugin)Thank them for their inspiration