Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drudv/dumpmeta-webpack-plugin
Save Webpack build metadata to a file
https://github.com/drudv/dumpmeta-webpack-plugin
hash save webpack webpack-plugin webpack-stats
Last synced: 18 days ago
JSON representation
Save Webpack build metadata to a file
- Host: GitHub
- URL: https://github.com/drudv/dumpmeta-webpack-plugin
- Owner: drudv
- License: mit
- Created: 2019-12-12T23:11:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-15T21:44:37.000Z (almost 4 years ago)
- Last Synced: 2024-10-18T19:41:43.430Z (28 days ago)
- Topics: hash, save, webpack, webpack-plugin, webpack-stats
- Language: TypeScript
- Size: 137 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```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](https://webpack.js.org/api/stats/) 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})` |