chrome-extension-archive-webpack-plugin

Chrome Extension archive plugin for Webpack

Usage no npm install needed!

<script type="module">
  import chromeExtensionArchiveWebpackPlugin from 'https://cdn.skypack.dev/chrome-extension-archive-webpack-plugin';
</script>

README

chrome-extension-archive-webpack-plugin

npm version

Create Chrome Extension archive for submitting to Chrome Web Store

Installation

npm i --save-dev html-webpack-plugin
yarn add --dev html-webpack-plugin

Options

Name Type Default Description
algorithm string zip The compression algorithm
filename string directory option Name of the archive
directory string undefined Path to the target directory
to string . Output path
verbose boolean false Outputs logs to console

Usage

Basic

import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
    plugins: [
        // This will create `build.zip` in current directory
        new ChromeExtensionArchiveWebpackPluginOptions({
            directory: 'build'
        })
    ]
}

Archive build directory

import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
    plugins: [
        // This will create `build.zip` from `build/` to `build/`
        new ChromeExtensionArchiveWebpackPluginOptions({
            directory: 'build',
            to: 'build'
        })
    ]
}

Change filename

import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
    plugins: [
        // This will create `myzip.zip` in current directory
        new ChromeExtensionArchiveWebpackPluginOptions({
            directory: 'build',
            filename: 'myzip'
        })
    ]
}

License

MIT