# web-extpack

> CLI to bundle a WebExtension module using webpack

Latest version **2.0.1** (published 2026-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install web-extpack
pnpm add web-extpack
yarn add web-extpack
bun add web-extpack
```

Provides the command `web-extpack`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-10-22 |
| First published | 2018-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 4 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | demingongo |
| Maintainers | demingongo |
| Keywords | WebExtension, modules, webpack, npm |

## Links

- npm: https://www.npmjs.com/package/web-extpack
- Repository: https://github.com/kisiwu/web-extpack
- Homepage: https://github.com/kisiwu/web-extpack#readme
- Issues: https://github.com/kisiwu/web-extpack/issues
- npm.io page: https://npm.io/package/web-extpack

## Dependencies (4)

- [mkdirp](https://npm.io/package/mkdirp.md) ^3.0.1
- [webpack](https://npm.io/package/webpack.md) ^5.112.0
- [commander](https://npm.io/package/commander.md) ^15.0.0
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^7.2.3

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2026-10-22
- 2.0.0 — 2026-02-09
- 1.0.0 — 2022-11-27
- 0.2.3 — 2021-09-16
- 0.2.2 — 2021-09-16
- 0.2.1 — 2021-08-28
- 0.1.1 — 2021-03-12
- 0.1.0 — 2020-05-16
- 0.0.3 — 2019-03-04
- 0.0.2 — 2018-06-13
- 0.0.1 — 2018-04-14

## README

# web-extpack
CLI to bundle a WebExtension using webpack.

It uses a [webpack](https://www.npmjs.com/package/webpack) config file with 4 more available properties that set "entry", "output.path" and "output.filename" if not already set:

- ENTRY_DIR: The entry directory. (default: "src")
- ENTRY_FILES_EXT: Entry files with those extensions. (default: [".js"])
- OUTPUT_DIR: The output directory. (default: "build")
- OUTPUT_FILES: (default: "[name]/bundle.js")

## Installation
```sh
npm install --save-dev web-extpack
```

## Commands

```
web-extpack --help
```

```
web-extpack setup [options]
```

```
web-extpack build [options]
```

## Options
- `--config <path>`: Path to the config file. (default: "web-extpack.config.js")

### setup options
- `-t, --template <template-name>`: Choose a template for the config file. (choices: ["basic", "advanced"], default: "basic")
- `--src-files`: Add empty files in "src" folder if there is no "src/manifest.json".

---
_Source: https://npm.io/package/web-extpack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
