Skip to content

bobbibg/write-json-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write JSON Webpack Plugin

Build Status

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 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)
})

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published