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

1.1.3 • Public • Published

Stats reporting plugin for webpack

Build Status Coverage Status dependencies Status devDependencies Status peerDependencies Status semantic-release Greenkeeper badge

Send the stats of a build to a reporting service. Currently DataDog is the only reporter implemented.

Installation

npm install --save-dev stats-reporter-webpack-plugin

Usage

const { StatsPlugin, DataDogStatsReporter } = require('stats-reporter-webpack-plugin');
 
module.exports = {
  plugins: [
    new StatsReporterPlugin({
      test:
      reporter: new DataDogStatsReporter({
        apiKey: process.env.DD_API_KEY,
        metricName: 'my-app.assets',
        tags: ['app:my-app', 'env:production'],
        test: /(js|css)$/
      })
    })
  ]
};

API

StatsReporterPlugin

new StatsReporterPlugin(options: StatsReporterPluginOptions);

StatsReporterPluginOptions fields

  • reporter: StatsReporter: The reporter to use for sending stats.

Stats Reporters

DataDogStatsReporter

new DataDogStatsReporter(options: DataDogStatsReporterOptions);
DataDogStatsReporterOptions fields
  • apiKey: string: Your DataDog API key
  • gzipSize?: boolean = true: Report gzipped size if true, uncompressed size if false
  • metricName: string: The base name for the metric
  • tags?: string[]: Custom tags for the metric. The following tags are always added:
    • chunk: the chunk name
    • type: the type of asset (js, css, etc)
  • test?: RegExp: Test to match files against. If not set, stats for all emitted assets will be sent.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.3
    2
    • latest

Version History

Package Sidebar

Install

npm i stats-reporter-webpack-plugin

Weekly Downloads

2

Version

1.1.3

License

MIT

Unpacked Size

23.3 kB

Total Files

14

Last publish

Collaborators

  • brandondoran