webpack-manifest-helper-plugin
v0.1.2
Published
Generates a js manifest object that maps chunk names to their corresponding output files.
Downloads
5
Readme
webpack manifest helper plugin
Alternative to webpack-manifest-plugin
Inspired(copied) from webpack-manifest-plugin
Install
yarn add -D webpack-manifest-helper-plugin
Usage
Unlike other plugins, you get two objects after require
this plugin.
const ManifestHelper = require('webpack-manifest-helper-plugin')
// 1. the plugin
{
plugins: [
// ...
new ManifestHelper.plugin()
]
}
// 2. the manifest object
Manifesthelper.manifest
When to use
- You don't need a manifest file
- access the filemap in other plugins
Checkout the example to see how it works.
Example
// configa
{
plugins: [
// ...
new ManifestHelper.plugin()
]
}
// configb
{
plugins: [
// ...
new ManifestHelper.plugin()
]
}
// configc
{
plugins: [
// ...
new OtherPlugin(() => {
// now you have the filemap from configa and configb
ManifestHelper.manifest
})
]
}
// use with webpack nodejs api
// mind the sequence
webpack([configa, configb], () => webpack(configc))