2.0.0 • Published 6 years ago

html-manifest-plugin v2.0.0

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

html-manifest-plugin

When using html-webpack-plugin, generate a JSON file that corresponds to the key value pair of the template file and the target file

Install

npm install --save-dev html-manifest-plugin

Usage

webpack.config.js

const HtmlManifestPlugin = require("html-manifest-plugin");

module.exports = {
  ...
  ,plugins: [
    ...
        new HtmlManifestPlugin()
    ...
  ]
}

Emits html-manifest.json as file in the output directory

Options

nametypedefaultdescription
pathstringundefinedFile path
filenamestringhtml-manifest.jsonFile name
templatesstring or arrayundefinedThe generated JSON will inject the template files (the template file is the template in the html-webpack-plugin)
variablestringhtml_manifest_jsonJSON variable name injected into the template files