# dumpmeta-webpack-plugin

> Save Webpack build metadata to a file

Latest version **0.2.0** (published 2020-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install dumpmeta-webpack-plugin
pnpm add dumpmeta-webpack-plugin
yarn add dumpmeta-webpack-plugin
bun add dumpmeta-webpack-plugin
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2020-11-15 |
| First published | 2019-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Dmitry Druganov |
| Maintainers | drud |

## Links

- npm: https://www.npmjs.com/package/dumpmeta-webpack-plugin
- Repository: https://github.com/drudv/dumpmeta-webpack-plugin
- npm.io page: https://npm.io/package/dumpmeta-webpack-plugin

## Dependencies (1)

- [webpack](https://npm.io/package/webpack.md) >=4.0.0 <6.0.0

## Recent versions

- 0.2.0 (latest) — 2020-11-15
- 0.1.0 — 2019-12-13

## README

# Webpack Dump Metadata Plugin

Save Webpack build metadata to a file.

## Install

`npm install dumpmeta-webpack-plugin --save-dev`

or

`yarn add dumpmeta-webpack-plugin --dev`

## Usage

webpack.config.js:

```js
const { DumpMetaPlugin } = require('dumpmeta-webpack-plugin');

module.exports = {
  ...

  plugins: [
    ...

    new DumpMetaPlugin({
      filename: 'dist/meta.json',
      prepare: stats => ({
        // add any other information you need to dump
        hash: stats.hash,
      })
    }),
  ]
}
```

Please refer to the [Webpack documentation](https://webpack.js.org/api/stats/) for all available properties of the Stats data.

## Options

|      Name      | Description                                                                                           | Default                         |
| :------------: | :---------------------------------------------------------------------------------------------------- | :------------------------------ |
| **`filename`** | Path to the output file                                                                               | `'meta.json'`                   |
| **`prepare`**  | Extract properties from Webpack build metadata to save. These options should be serializable to JSON. | `stats => ({hash: stats.hash})` |

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