npm install record-entry-plugin --save-dev
// At the end, the file name of the entry file record is `${publicPath}+${fileName}.json`, PublicPath reads webpack configuration publicPath
new recordEntryPlugin({
fileName: 'chunks'
});
when the config of webpack is :
entry: path.resolve(__dirname, `../src/index.js`),
content of chunk.json :
{"main":["/main.6097c34ccf96ffa3b783.js"]}
when the config of webpack is :
entry: {
design: path.resolve(__dirname, `../src/design/index.js`),
runtime: path.resolve(__dirname, `../src/runtime/index.js`)
}
content of chunk.json :
{
"design": ["/design.b7b434d9ea6818c7e822.js"],
"runtime": [
"/css/runtime.0826353e91956fa5d041.css",
"/runtime.662c683e4ed914a7e798.js"
]
}
The record-entry-plugin
is MIT licensed.