# rollup-plugin-bundle-hash

> Write rollup output content hashes to a file.

Latest version **1.0.0** (published 2019-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-bundle-hash
pnpm add rollup-plugin-bundle-hash
yarn add rollup-plugin-bundle-hash
bun add rollup-plugin-bundle-hash
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-01-01 |
| First published | 2019-01-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dan Rouse |
| Maintainers | kremonte |
| Keywords | rollup, plugin, hash, hasha |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-bundle-hash
- Repository: https://github.com/danrouse/rollup-plugin-bundle-hash
- Homepage: https://github.com/danrouse/rollup-plugin-bundle-hash#readme
- Issues: https://github.com/danrouse/rollup-plugin-bundle-hash/issues
- npm.io page: https://npm.io/package/rollup-plugin-bundle-hash

## Dependencies (1)

- [hasha](https://npm.io/package/hasha.md) ^3.0.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-01-01

## README

# rollup-plugin-bundle-hash

Write rollup output content hashes to a file.

## Installation

```sh
npm install --save-dev rollup-plugin-bundle-hash
```

## Usage

Add this plugin at the end of your `plugins` array, after compiled assets are available for hashing. A hash of bundle contents will be written to a file.

```js
// rollup.config.js
import bundleHash from 'rollup-plugin-bundle-hash';

export default {
  // ...
  plugins: [
    bundleHash('path/to/output.hash')
  ]
}
```

## Options

A second argument can be passed with an array of paths to non-bundled assets that you want included in the content hash, for example CSS not handled by rollup.

```js
bundleHash('output.hash', ['dist/bundle.css', 'dist/something'])
```

## Why?

To provide a way to track bundle updates more accurately than checking bundle filesize or modification time. Rollup will touch output bundles even if they don't change, which can be annoying when live-reloading.

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