mirror of
https://github.com/expo/stats-webpack-plugin.git
synced 2026-11-27 16:49:37 -10:00
I just spent a while trying to figure out why this wasn't giving me timing measurements. Hopefully this note will stop other people hitting this problem.
1.7 KiB
1.7 KiB
Stats plugin for webpack

Writes the stats of a build to a file.
Installation
$ npm install --save stats-webpack-plugin
Usage
var StatsPlugin = require('stats-webpack-plugin');
module.exports = {
plugins: [
new StatsPlugin('stats.json', {
chunkModules: true,
exclude: [/node_modules[\\\/]react/]
})
]
};
Give webpack the --profile flag or set profile: true in webpack.config to get detailed timing measurements.
See Webpack Profiling for more detail.
API
new StatsPlugin(path: string, [options])
path: The path of the result file, relative to your output folder.options: Options passed to stats.toJson
Meta
- Code:
git clone git://github.com/unindented/stats-webpack-plugin.git - Home: https://github.com/unindented/stats-webpack-plugin/
Contributors
- Daniel Perez Alvarez ([email protected])
- Izaak Schroeder ([email protected])
License
Copyright (c) 2014 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.