0.1.4 • Published 6 years ago

webpack-manifest-extra-plugin v0.1.4

Weekly downloads
82
License
ISC
Repository
github
Last release
6 years ago

webpack-manifest-extra-plugin

CircleCI

manifest.json generator can be used not only include all emitted assets but also in multiply compilation cases

why?

webpack-manifest-plugin is fine? why another manifest-plugin?

  • can not used in multiply compilation cases, use 'seed' option sometimes it will get wrong file format
  • if you include another plugin that just emit file in webpack compilation, the manifest.json will not find it

how?

after every emit and done,this plugin will find the manifest.json in dist folder,if already has,it will merge old manifest and new manifest to a final file,and you can modify it just by transform function

install

yarn add webpack-manifest-extra-plugin -D
# or
npm install webpack-manifest-extra-plugin -D

use

// webpack.config.js
const WebpackManifestExtraPlugin = require('webpack-manifest-extra-plugin')
{
  //...
  plugins:[
    new WebpackManifestExtraPlugin({
      filename:'manifest.json' // default -> manifest.json,
      verbose: true // default -> true,
      publicPath:'/' // default -> webpack's publicPath config
      transform(manifest){ // manifest.json object && webpack's statsJson object
        // ... your transforms
        return manifest // return
      }
    })
  ]
  //...
}

use in multiply compilation in this example two compilation are all use the default same filename 'manifest.json', so plugin will merge it to one final file

// webpack.config.js
[
  // first
  {
    // ...
    plugins: [new WebpackManifestExtraPlugin()]
    // ...
  },
  // second
  {
    //...
    plugins: [new WebpackManifestExtraPlugin()]
    //...
  }
]
0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago