A webpack plugin that emits a json file based on input.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package-lock.json
package.json

README.md

Write JSON Webpack Plugin

Emits a JSON file that contains data passed through to it

Install

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

Configuration

// Add to your Webpack config file
var path = require('path');
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

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