New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chunks-2-json-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chunks-2-json-webpack-plugin

Plugin for webpack 4, that outputs build files to JSON

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-14.89%
Maintainers
1
Weekly downloads
 
Created
Source

chunks-2-json-webpack-plugin

Plugin for webpack 4, that outputs build files to JSON

Instalation

npm i --save-dev chunks-2-json-webpack-plugin

Use case

Webpack is a great tool and has witout a doubt revolutionized the way we build frontend applications. However usually, due to the caching strategy, chunck files will have hash appended to their file name. And if you want to use yoru build in an env, that does not know anything about this, it becomes complicated to inject the build in your app.

Therefore this plugin was build, as it will output your chunks in a JSON file, that will allow other apps to understand the structure of the build.

Usage example

Input
const Chunks2JsonPlugin = require('chunks-2-json-webpack-plugin');

module.exports = {
    configureWebpack: {
        plugins: [
            new Chunks2JsonPlugin({ outputDir: 'dist/', filename: 'my-app.json' })
        ]
    }
}
Output
{
  "chunk-vendors": {
    "js": "/js/chunk-vendors.fc40696c.js",
    "jsMap": "/js/chunk-vendors.fc40696c.js.map"
  },
  "app": {
    "css": "dist/css/app.eb829ccc.css",
    "js": "/dist/js/app.dd31cdcb.js",
    "jsMap": "/dist/js/app.dd31cdcb.js.map"
  }
}

Questions?

Feel free to open an issue.

Keywords

FAQs

Package last updated on 11 Jul 2018

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