Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webpack-manifest-resource-plugin

hubcarl691MIT4.2.7

webpack manifest resource dependencies plugin

webpack, manifest, webpack-manifest-plugin

readme

webpack-manifest-resource-plugin

normalize js/css resource dependencies for webpack-manifest-plugin

Install

npm install --save-dev webpack-manifest-resource-plugin

Usage

var ManifestPlugin = require('webpack-manifest-resource-plugin');

module.exports = {
    // ...
    plugins: [
      new ManifestPlugin()
    ]
};

This will generate a manifest.json file in your root output directory with a mapping of all source file names to their corresponding output file, for example:

{

 "mods/alpha.js": "mods/alpha.1234567890.js",
 "mods/alpha.css": "mods/alpha.435336266.css",
 "mods/omega.js": "mods/omega.0987654321.js",
 "mods/omega.css": "mods/omega.323299900.css",
 "vendor": "vendor.32465656.js"

  deps:{
    "mods/alpha.js":{
      js: ["vendor.32465656.js", "mods/alpha.1234567890.js"],
      css: ["mods/alpha.435336266.css"]
    },
    "mods/omega.js":{
      js: ["vendor.32465656.js", "mods/omega.0987654321.js"],
      css: ["mods/omega.323299900.css"]
    }
  }
}

API

support webpack-manifest-plugin all api, and add commonsChunk config:

options.commonsChunk

Type: Array
Default: []

the commonsChunk is webpack.optimize.CommonsChunkPlugin name config.

changelog

4.2.7 / 2021-06-23

4.2.6 / 2018-11-05

  • fix: resource repeat

4.2.5 / 2018-11-05

4.2.2 / 2018-03-29

  • fix: manifest deps key missing .js

4.0.0 / 2018-03-07

  • webpack 4 support

2.0.2 / 2017-12-13

  • fix: comptible low manifest plugin not mapping publicPath

2.0.0 / 2017-12-08

  • feat: webpack dll manifest merge project manifest

1.0.0 / 2017-11-09

  • feat:create file deps when webpack build