webpack-entry-manifest-plugin
v2.0.0
Published
Webpack plugin for generating an asset manifest with grouped entry chunks.
Downloads
148
Maintainers
Readme
webpack-entry-manifest-plugin
Webpack plugin for generating an asset manifest with grouped entry chunks
Usage
const WebpackEntryManifestPlugin = require('webpack-entry-manifest-plugin');
module.exports = {
// ... Webpack configure
plugins: [
// ... Webpack plugins
new WebpackEntryManifestPlugin({
filename: 'manifest.json', // Assets manifest filename
map: (path, chunk) => path, // Assets path map function
filter: (path, chunk) => true, // Assets path filter function
serialize: manifest => JSON.stringify(manifest) // Assets manifest serialize function
})
]
};
Output
{
"index": {
"js": [
"/Assets/dist/js/runtime.js",
"/Assets/dist/js/react.js",
"/Assets/dist/js/vendors.js",
"/Assets/dist/js/antd.js",
"/Assets/dist/js/index.js"
],
"css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/index.css"]
},
"login/index": {
"js": [
"/Assets/dist/js/runtime.js",
"/Assets/dist/js/react.js",
"/Assets/dist/js/vendors.js",
"/Assets/dist/js/antd.js",
"/Assets/dist/js/login/index.js"
],
"css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/login/index.css"]
},
"user/index": {
"js": [
"/Assets/dist/js/runtime.js",
"/Assets/dist/js/react.js",
"/Assets/dist/js/vendors.js",
"/Assets/dist/js/antd.js",
"/Assets/dist/js/user/index.js"
],
"css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/user/index.css"]
}
}