0.1.2 • Published 8 years ago

webpack-manifest-helper-plugin v0.1.2

Weekly downloads
6
License
MIT
Repository
-
Last release
8 years ago

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))
0.1.2

8 years ago

0.0.1

8 years ago