Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

webpack-entry-manifest-plugin

2.0.0 • Public • Published

webpack-entry-manifest-plugin

Webpack plugin for generating an asset manifest with grouped entry chunks

NPM Version Download Status Node Version Dependencies

Usage

const WebpackEntryManifestPlugin = require('webpack-entry-manifest-plugin');
 
module.exports = {
  // ... Webpack configure
  plugins: [
    // ... Webpack plugins
    new WebpackEntryManifestPlugin({
      filename: 'manifest.json', // Assets manifest filename
      map: (path, chunk) => path, // Assets path map function
      filter: (path, chunk) => true, // Assets path filter function
      serialize: manifest => JSON.stringify(manifest) // Assets manifest serialize function
    })
  ]
};

Output

{
  "index": {
    "js": [
      "/Assets/dist/js/runtime.js",
      "/Assets/dist/js/react.js",
      "/Assets/dist/js/vendors.js",
      "/Assets/dist/js/antd.js",
      "/Assets/dist/js/index.js"
    ],
    "css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/index.css"]
  },
  "login/index": {
    "js": [
      "/Assets/dist/js/runtime.js",
      "/Assets/dist/js/react.js",
      "/Assets/dist/js/vendors.js",
      "/Assets/dist/js/antd.js",
      "/Assets/dist/js/login/index.js"
    ],
    "css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/login/index.css"]
  },
  "user/index": {
    "js": [
      "/Assets/dist/js/runtime.js",
      "/Assets/dist/js/react.js",
      "/Assets/dist/js/vendors.js",
      "/Assets/dist/js/antd.js",
      "/Assets/dist/js/user/index.js"
    ],
    "css": ["/Assets/dist/css/antd.css", "/Assets/dist/css/user/index.css"]
  }
}

License

MIT

Install

npm i webpack-entry-manifest-plugin

DownloadsWeekly Downloads

204

Version

2.0.0

License

MIT

Unpacked Size

9.4 kB

Total Files

6

Last publish

Collaborators

  • avatar