@grapes-agency/named-chunk-group
v1.0.2
Published
A webpack plugin to generate a manifest.json grouped by chunk names.
Downloads
2
Readme
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"
}
]
}