Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emit-json-file-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emit-json-file-webpack-plugin

Creates a json file from a JavaScript object during the Webpack Building Process

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm

Emit Json-File Webpack Plugin

Creates a json file from a JavaScript object during the Webpack Building Process.

Install

npm i -D emit-json-file-webpack-plugin

Usage

new EmitJsonFileWebpackPlugin([files])

A file looks like: { path: 'filePath', content: 'object' }

NameDetails
pathThis file path will created inside the Output Directory
example: 'folder/file.txt'
contentThe JavaScript object to be formatted as JSON. The Plugin uses json-format internally to format the object.

Examples

const EmitJsonFileWebpackPlugin = require('emit-json-file-webpack-plugin')

const fileContent = {
    importantValueA: 'A',
    valueB: 'B'
}

module.exports = {
    ...
    plugins: [
        new EmitJsonFileWebpackPlugin([
            // {output}/folder/file.txt
            { path: 'folder/file.txt', content: fileContent },
        ])
    ]
}

Keywords

FAQs

Package last updated on 20 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc