# pilet-webpack-plugin

> Webpack plugin for generating a valid pilet bundle.

Latest version **1.2.0** (published 2026-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install pilet-webpack-plugin
pnpm add pilet-webpack-plugin
yarn add pilet-webpack-plugin
bun add pilet-webpack-plugin
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-03-18 |
| First published | 2020-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0 |
| Dependencies | 0 |
| Unpacked size | 28.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | smapiot |
| Maintainers | florianrappl |
| Keywords | piral-cli, piral, plugin, webpack, command |

## Links

- npm: https://www.npmjs.com/package/pilet-webpack-plugin
- Repository: https://github.com/smapiot/piral-cli-webpack
- Homepage: https://piral.io
- Issues: https://github.com/smapiot/piral-cli-webpack/issues
- Funding: https://github.com/sponsors/smapiot
- npm.io page: https://npm.io/package/pilet-webpack-plugin

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2026-03-18
- 1.2.0-beta.b1b189b (next) — 2026-08-08
- 1.1.0-beta.9b1d238 — 2026-03-18
- 1.1.0 — 2024-12-26
- 1.1.0-beta.7707 — 2024-12-26
- 1.1.0-beta.7697 — 2024-12-26
- 1.0.1 — 2023-10-27
- 1.0.0 — 2023-07-07
- 1.0.0-beta.5761 — 2023-07-07
- 0.15.1-beta.5715 — 2023-06-24
- 0.15.2 — 2022-12-13
- 0.15.1 — 2022-11-28
- 0.15.1-beta.4928 — 2022-11-28
- 0.15.1-beta.4924 — 2022-11-28
- 0.15.0 — 2022-11-17
- … 52 more at https://npm.io/package/pilet-webpack-plugin/versions

## README

<div align="center">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
</div>

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![chat][chat]][chat-url]
[![size][size]][size-url]

# pilet-webpack-plugin

The `pilet-webpack-plugin` helps you to build pilets using Webpack.

## Getting Started

To begin, you'll need to install `pilet-webpack-plugin`:

```sh
npm install pilet-webpack-plugin --save-dev
```

Then add the plugin to your `webpack` config. For example:

**webpack.config.js**

```js
const { PiletWebpackPlugin } = require('pilet-webpack-plugin');
const piletPkg = require('./package.json');

module.exports = {
  plugins: [
    new PiletWebpackPlugin({
      name: piletPkg.name,
      version: piletPkg.version,
      piral: piletPkg.piral.name,
    }),
  ],
};
```

And run `webpack` via your preferred method.

## Options

### `variables`

Allows supplying additional variables to be used as definitions. Similar to the `definePlugin`.

Example:

```js
const { PiletWebpackPlugin } = require('pilet-webpack-plugin');
const piletPkg = require('./package.json');

module.exports = {
  plugins: [
    new PiletWebpackPlugin({
      name: piletPkg.name,
      version: piletPkg.version,
      piral: piletPkg.piral.name,
      variables: {
        PIRAL_CLI_VERSION: require('piral-cli/package.json').version,
      },
    }),
  ],
};
```

## Contributing

Contributions in any form are appreciated and much welcome!

Just make sure to post an issue or reach out to us on the [![Community Chat](https://img.shields.io/discord/1222632475449229352)](https://discord.gg/kKJ2FZmK8t) before starting actual work on anything. It really helps to avoid problems.

## License

This plugin is released using the MIT license.

[npm]: https://img.shields.io/npm/v/pilet-webpack-plugin.svg
[npm-url]: https://npmjs.com/package/pilet-webpack-plugin
[node]: https://img.shields.io/node/v/pilet-webpack-plugin.svg
[node-url]: https://nodejs.org
[chat]: https://img.shields.io/badge/gitter-piral.io%2Fcommunity-brightgreen.svg
[chat-url]: https://discord.gg/kKJ2FZmK8t
[size]: https://packagephobia.now.sh/badge?p=pilet-webpack-plugin
[size-url]: https://packagephobia.now.sh/result?p=pilet-webpack-plugin

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