# webpack-chunk-hash

> Plugin to replace a standard webpack chunk hashing with custom (md5) one.

Latest version **0.6.0** (published 2018-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-chunk-hash
pnpm add webpack-chunk-hash
yarn add webpack-chunk-hash
bun add webpack-chunk-hash
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2018-04-02 |
| First published | 2016-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/webpack-chunk-hash) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Author | Alex Indigo |
| Maintainers | alexindigo, dogmatico, mtraynham |
| Keywords | webpack, hash, plugin, md5 |

## Links

- npm: https://www.npmjs.com/package/webpack-chunk-hash
- Repository: https://github.com/alexindigo/webpack-chunk-hash
- Homepage: https://github.com/alexindigo/webpack-chunk-hash#readme
- Issues: https://github.com/alexindigo/webpack-chunk-hash/issues
- npm.io page: https://npm.io/package/webpack-chunk-hash

## Dependencies (1)

- [@types/webpack](https://npm.io/package/@types/webpack.md) ^3.0.0 || ^4.0.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.6.0 (latest) — 2018-04-02
- 0.5.0 — 2017-10-06
- 0.4.0 — 2017-02-06
- 0.3.0 — 2016-11-13
- 0.2.0 — 2016-11-09
- 0.1.0 — 2016-11-09

## README

# webpack-chunk-hash

Plugin to replace a standard webpack chunk hashing with custom (md5) one.

_Note: It's a clone of [webpack-md5-hash](https://www.npmjs.com/package/webpack-md5-hash) plugin, but without sorting provided chunks (unobtrusive),
and using native crypto module (performance)._

## Install

```
npm install --save-dev webpack-chunk-hash
```

## Example

Just add this plugin as usual.

```javascript

// webpack.config.js

var WebpackChunkHash = require('webpack-chunk-hash');

module.exports = {
  // ...
  output: {
    filename: '[name].[chunkhash].js',
    chunkFilename: '[name].[chunkhash].js',
  },
  plugins: [
    new WebpackChunkHash({algorithm: 'md5'}) // 'md5' is default value
  ]
};

```

## Options

```
// a callback to add more content to the resulting hash
additionalHashContent: function(chunk) { return 'your additional content to hash'; } 
// which algorithm to use (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
algorithm: 'md5'
// which digest to use (https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding)
digest:    'hex'
```

## License

WebpackChunkHash plugin is released under the [MIT](License) license.

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