JSPM

write-json-webpack-plugin

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 276
  • Score
    100M100P100Q86683F
  • License MIT

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

Package Exports

  • write-json-webpack-plugin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-json-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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