# chunk-manifest-webpack-plugin

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

Latest version **1.1.2** (published 2017-07-26) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2017-07-26 |
| First published | 2014-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 394 |
| Author | Jason Anderson |
| Maintainers | diurnalist, sc-web-collective |
| Keywords | webpack, chunk, manifest, plugin |

## Links

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

## Dependencies (1)

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

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2017-07-26
- 1.1.1 — 2017-07-24
- 1.1.0 — 2017-04-24
- 1.0.0 — 2016-12-07
- 0.1.0 — 2016-05-31
- 0.0.1 — 2014-09-17

## README

# chunk-manifest-webpack-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.

## Usage

Install via npm:

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

Install via yarn:

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

And then require and provide to webpack:

```javascript
// in webpack.config.js or similar
const ChunkManifestPlugin = require('chunk-manifest-webpack-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/chunk-manifest-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
