@grapes-agency/named-chunk-group

1.0.2 • Public • Published

named-chunk-group

A webpack plugin to generate a manifest.json grouped by chunk names.

Install

$ npm install --save-dev @grapes-agency/named-chunk-group

Usage

const NamedChunkGroupPlugin = require("@grapes-agency/named-chunk-group");
const path = require("path");

const webpackConfig = {
  entry: {
    main: "main.js",
    polyfill: "polyfill.js"
  },
  output: {
    filename: "[name].js",
    chunkFilename: "[name].js",
    path: path.resolve(__dirname, "dist")
  },
  plugins: [
    new NamedChunkGroupPlugin({
      filename: "./manifest.json"
    })
  ]
};

This will generate a manifest.json with this content:

{
  "main": [
    {
      "id": "main",
      "name": "main",
      "file": "main.js",
      "publicPath": "/dist/main.js"
    }
  ],
  "polyfill": [
    {
      "id": "polyfill",
      "name": "polyfill",
      "file": "polyfill.js",
      "publicPath": "/dist/polyfill.js"
    }
  ]
}

Readme

Keywords

Package Sidebar

Install

npm i @grapes-agency/named-chunk-group

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

2.87 kB

Total Files

3

Last publish

Collaborators

  • tim.fullert
  • torsten4385
  • tsollbach
  • cpoyatos
  • jguse
  • grapes-gmbh