dumpmeta-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Webpack Dump Metadata Plugin

Save Webpack build metadata to a file.

Install

npm install dumpmeta-webpack-plugin --save-dev

or

yarn add dumpmeta-webpack-plugin --dev

Usage

webpack.config.js:

const { DumpMetaPlugin } = require('dumpmeta-webpack-plugin');
 
module.exports = {
  ...
 
  plugins: [
    ...
 
    new DumpMetaPlugin({
      filename: 'dist/meta.json',
      prepare: stats => ({
        // add any other information you need to dump
        hash: stats.hash,
      })
    }),
  ]
}

Please refer to the Webpack documentation for all available properties of the Stats data.

Options

Name Description Default
filename Path to the output file 'meta.json'
prepare Extract properties from Webpack build metadata to save. These options should be serializable to JSON. stats => ({hash: stats.hash})

Readme

Keywords

none

Package Sidebar

Install

npm i dumpmeta-webpack-plugin

Weekly Downloads

2,179

Version

0.2.0

License

MIT

Unpacked Size

4.96 kB

Total Files

8

Last publish

Collaborators

  • drud