# add-build-number-plugin

> Set the build number on file

Latest version **0.0.6** (published 2019-09-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install add-build-number-plugin
pnpm add add-build-number-plugin
yarn add add-build-number-plugin
bun add add-build-number-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-09-26 |
| First published | 2018-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vladimir Varavva |
| Maintainers | acid-base |

## Links

- npm: https://www.npmjs.com/package/add-build-number-plugin
- Repository: https://github.com/Acid-base/add-build-number-plugin
- Homepage: https://github.com/Acid-base/add-build-number-plugin#readme
- Issues: https://github.com/Acid-base/add-build-number-plugin/issues
- npm.io page: https://npm.io/package/add-build-number-plugin

## Recent versions

- 0.0.6 (latest) — 2019-09-26
- 0.0.5 — 2019-01-14
- 0.0.4 — 2018-12-29
- 0.0.3 — 2018-12-29
- 0.0.2 — 2018-12-29
- 0.0.1 — 2018-12-29

## README

# Add Build Number Plugin

Webpack plugin for add build number to files.

## Install

```bash
npm install --save-dev add-build-number-plugin
```

## Usage

In your `webpack.config.js`

```javascript
const AddBuildNumberPlugin = require('add-build-number-plugin');

module.exports = {
    // ...
    plugins: [
        new AddBuildNumberPlugin({
            test: /(.*)\.(js|css|gz)/,
            needHash: /^prefix/,
            output: `$1.[hash].[build-number].$2`,
            buildNumber: process.env.BUILD_NUMBER
        })
    ]
};

module.exports = {
    // ...
    plugins: [
        new AddBuildNumberPlugin({
            test: /(.*)\.(js|css|gz)/,
            needHash: /^prefix/,
            output: `$1.[hash].[build-number].$2`,
            var: 'BUILD_NUMBER' // key from compilation
        })
    ]
};
```

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