# write-json-webpack-plugin

> A webpack plugin that emits a json file based on input.

Latest version **1.1.0** (published 2018-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install write-json-webpack-plugin
pnpm add write-json-webpack-plugin
yarn add write-json-webpack-plugin
bun add write-json-webpack-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 | 1.1.0 |
| Published | 2018-11-13 |
| First published | 2016-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rob Barns-Graham |
| Maintainers | dfournier, robertbg |

## Links

- npm: https://www.npmjs.com/package/write-json-webpack-plugin
- Repository: https://github.com/robertbg/write-json-webpack-plugin
- Homepage: https://github.com/robertbg/write-json-webpack-plugin#readme
- Issues: https://github.com/robertbg/write-json-webpack-plugin/issues
- npm.io page: https://npm.io/package/write-json-webpack-plugin

## Recent versions

- 1.1.0 (latest) — 2018-11-13
- 1.0.2 — 2017-07-13
- 1.0.1 — 2017-07-13
- 1.0.0 — 2016-08-09

## README

# Write JSON Webpack Plugin

[![Build Status](https://travis-ci.com/aponyx/write-json-webpack-plugin.svg?branch=master)](https://travis-ci.com/aponyx/write-json-webpack-plugin)

Emits a JSON file that contains data passed through to it

## Install

```bash
npm install --save-dev write-json-webpack-plugin
```

## Configuration

```js
// Add to your Webpack config file
var WriteJsonPlugin = require('write-json-webpack-plugin');

module.exports = {
  plugins: [new WriteJsonPlugin()]
};  
```

## Options

Write JSON Webpack Plugin accepts three options, the object to write, the path and filename

```js
new WriteJsonPlugin({
    object: [object]
    path: 'public',
    // default output is timestamp.json
    filename: 'timestamp.json',
    pretty: true // makes file human-readable (default false)
})
```

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