# webpack-chunk-manifest-plugin

> Allows exporting a manifest that maps chunk ids to their output files, instead of keeping the mapping inside the webpack bootstrap.

Latest version **3.0.2** (published 2017-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-chunk-manifest-plugin
pnpm add webpack-chunk-manifest-plugin
yarn add webpack-chunk-manifest-plugin
bun add webpack-chunk-manifest-plugin
```

## 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 | 3.0.2 |
| Published | 2017-07-21 |
| First published | 2017-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jake Niemiec |
| Maintainers | jakeniemiec |
| Keywords | webpack, webpack3, hash, fingerprint, chunk, manifest, plugin |

## Links

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

## Dependencies (1)

- [webpack-core](https://npm.io/package/webpack-core.md) ^0.6.9

## 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

- 3.0.2 (latest) — 2017-07-21
- 3.0.1 — 2017-07-21
- 3.0.0 — 2017-07-21

## README

# webpack-chunk-manifest-plugin

Allows exporting a JSON file that maps chunk ids to their resulting asset files. Webpack can then read this mapping, assuming it is provided somehow on the client, instead of storing a mapping (with chunk asset hashes) in the bootstrap script, which allows to actually leverage long-term caching.

##### This repo was (lovingly) forked from [soundcloud/chunk-manifest-webpack-plugin](https://github.com/soundcloud/chunk-manifest-webpack-plugin).

## Usage

Install via npm:

```shell
npm install --save-dev webpack-chunk-manifest-plugin
```

Install via yarn:

```shell
yarn add --dev webpack-chunk-manifest-plugin
```

And then require and provide to webpack:

```javascript
// in webpack.config.js or similar
const ChunkManifestPlugin = require('webpack-chunk-manifest-plugin');

module.exports = {
  // your config values here
  plugins: [
    new ChunkManifestPlugin({
      filename: 'manifest.json',
      manifestVariable: 'webpackManifest',
      inlineManifest: false
    })
  ]
};
```

### Options

#### `filename`

Where the manifest will be exported to on bundle compilation. This will be relative to the main webpack output directory. Default = `"manifest.json"`

#### `manifestVariable`

What JS variable on the client webpack should refer to when requiring chunks. Default = `"webpackManifest"`

#### `inlineManifest`

Whether or not to write the manifest output into the [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin). Default = `false`

```html
// index.ejs
<body>
    <!-- app -->
    <%= htmlWebpackPlugin.files.webpackManifest %>
</body>
```

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