webpack-export-stats-plugin
Webpack plugin to output export stats graph
Last updated 8 months ago by mquy90 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-export-stats-plugin 
SYNC missed versions from official npm registry.

Webpack Export Stats Plugin

Webpack plugin to output export stats graph from your project

npm node deps licenses

Installation

Via npm:

$ npm install webpack-export-stats-plugin --save-dev

Via yarn:

$ yarn add -D webpack-export-stats-plugin

output

Usage

const ExportStatsPlugin = require('webpack-export-stats-plugin');

const webpackConfig = {
  ...
  optimization: {
    usedExports: true,
  },
  plugins: [
    new ExportStatsPlugin({
      patterns: [
        'src/**/*.(js|jsx|css)',
      ],
      exclude: [
        '**/*.(stories|spec).(js|jsx)',
      ],
    })
  ]
}

Configuration

new ExportStatsPlugin(options);

options.patterns (default: ["**/*.*"])

The array of patterns to look for. Directly pass to fast-glob

options.exclude (default: [])

The array of patterns to not look at.

options.context

Current working directoy for patterns above. If you don't set explicitly, your webpack context will be used.

options.output (default: graph.json)

Location where your graph will be created.

options.log (default: info, value: info|verbose)

  • info shows number of used in other modules.
  • verbose contains array of modules which use that export.

options.numberOfMinDeps (default: 2)

Number of minimum dependencies to decide if exported functions is logged.

options.filterFunc (default: undefined)

A filter function which will decide whether module is logged.

Current Tags

  • 0.0.2                                ...           latest (8 months ago)

2 Versions

  • 0.0.2                                ...           8 months ago
  • 0.0.1                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |