webpack-plugin-module-manifest
v1.0.0
Published
A webpack plugin for generate a assets manifest file(JSON) that matches the entry points
Downloads
2
Maintainers
Readme
webpack-plugin-module-manifest
First, this plugin is only used in the Webpack project, and dependent on Webpack 3.0.0 or later.
See more details about webpack-plugin-module-manifest.
webpack-plugin-module-manifest
use multiple entry files (by glob pattern) to split the business module, and then generate the module manifest (JSON file), like this:
{
"app": {
"js": [
"static/js/runtime.cdb941df.js",
"static/js/locales.2695cd36.js",
"static/js/database.a4ba38e8.js",
"static/js/ui.ca1760da.js",
"static/js/api.d9ab5557.js",
"static/js/vendors.cfe65bf7.js",
"static/js/chunk-57bc4ef0.656c6510.js",
"static/js/app.f8be3573.js"
],
"css": [
"static/css/ui.4c37adb4.css",
"static/css/vendors.5fb94cd3.css",
"static/css/FileUpload.css",
"static/css/app.d92cc1a0.css"
]
},
"FileUpload": {
"js": [
"static/js/runtime.cdb941df.js",
"static/js/locales.2695cd36.js",
"static/js/database.a4ba38e8.js",
"static/js/ui.ca1760da.js",
"static/js/api.d9ab5557.js",
"static/js/vendors.cfe65bf7.js",
"static/js/FileUpload.d51090fc.js"
],
"css": [
"static/css/ui.4c37adb4.css",
"static/css/vendors.5fb94cd3.css",
"static/css/chunk-fde53da4.98fc6f4d.css",
"static/css/FileUpload.css"
]
},
"MailDrawer": {
"js": [
"static/js/runtime.cdb941df.js",
"static/js/locales.2695cd36.js",
"static/js/database.a4ba38e8.js",
"static/js/ui.ca1760da.js",
"static/js/api.d9ab5557.js",
"static/js/vendors.cfe65bf7.js",
"static/js/chunk-1b151980.3c722f2d.js",
"static/js/chunk-61df910d.f0cf586c.js",
"static/js/chunk-467530b7.47923548.js",
"static/js/MailDrawer.73b6e6a8.js"
],
"css": [
"static/css/ui.4c37adb4.css",
"static/css/vendors.5fb94cd3.css",
"static/css/chunk-fde53da4.98fc6f4d.css",
"static/css/chunk-1b151980.826db4e5.css",
"static/css/chunk-61df910d.0e8d25e4.css",
"static/css/MailDrawer.f2676485.css"
]
},
"OpenCustomerConcats": {
"js": [
"static/js/runtime.cdb941df.js",
"static/js/locales.2695cd36.js",
"static/js/database.a4ba38e8.js",
"static/js/ui.ca1760da.js",
"static/js/api.d9ab5557.js",
"static/js/vendors.cfe65bf7.js",
"static/js/OpenCustomerConcats.1e57fe04.js"
],
"css": [
"static/css/ui.4c37adb4.css",
"static/css/vendors.5fb94cd3.css",
"static/css/chunk-fde53da4.98fc6f4d.css",
"static/css/chunk-61df910d.0e8d25e4.css",
"static/css/OpenCustomerConcats.2ed73c4e.css"
]
}
}
Installtion
With PNPM:
pnpm install -D webpack-plugin-module-manifest
With Yarn:
yarn add -D webpack-plugin-module-manifest
With NPM:
npm install -D webpack-plugin-module-manifest
Usage
entryPattern
must be a glob pattern, and it will match the entry file of the module.
// webpack.config.js
const WebpackPluginModuleManifest from 'webpack-plugin-module-manifest'
module.exports = {
// ...
plugins: [
WebpackPluginModuleManifest()
// or
WebpackPluginModuleManifest({
output: 'dist/oModules-manifest.json',
entryPattern: 'src/modules/**/index.ts'
})
]
// ...
}
API
*
=Required
output
-string
- Output file path. default valuedist/oModules-manifest.json
entryPattern
-string
- Match the module's entry files using glob patterns. More usage see glob