Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Latest commit

 

History

History
64 lines (44 loc) · 1.08 KB

README.md

File metadata and controls

64 lines (44 loc) · 1.08 KB

webpack-md5-manifest-plugin

Generate JSON manifest based on the MD5 of files.

Build Status npm package

Usage

In your webpack.config.js:

const MD5Plugin = require('webpack-md5-manifest-plugin');

module.exports = {
    // ...

    plugins: [
      // ...
      new MD5Plugin()
    ]
}

Output example:

// dist/manifest.json
{
  "app.bundle.js": "20036d7b35b3613aa3c3baf24accc285",
  "lib.bundle.js": "e92ac4fed9a627c489ffeda66b9f4721"
}

Options

// webpack.config.js

module.exports = {
  output: {
    path: path.resolve(__dirname, 'dist')
  },
  plugins: [
    new MD5Plugin(options)
  ]
}

options.name

Type: String

Default: manifest.json

The output manifest filename.

options.algorithm

Type: String

Default: md5

The hash algorithm.