webpack-write-stats-plugin
Webpack plugin that writes the stats information to a defined file on build completion
Installing
$ npm install webpack-write-stats-plugin
Using
In your webpack config file:
webpack.config.json
const path = require('path');
const WebpackWriteStatsPlugin = require('webpack-write-stats-plugin');
module.exports = {
entry: [ ... ],
loaders: [ ... ],
plugins: [
new WebpackWriteStatsPlugin(path.resolve(__dirname, 'webpack-stats.json')),
]
};
Configuration
WebpackWriteStatsPlugin takes 2 parameters:
new WebpackWriteStatsPlugin(fileLocation, [statsConfiguation={}])
Run tests
To run the tests, written in jest:
npm run test