Webpack plugin to output export stats graph from your project
Via npm:
$ npm install webpack-export-stats-plugin --save-dev
Via yarn:
$ yarn add -D webpack-export-stats-plugin
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)',
],
})
]
}
new ExportStatsPlugin(options);
The array of patterns to look for. Directly pass to fast-glob
The array of patterns to not look at.
Current working directoy for patterns above. If you don't set explicitly, your webpack context will be used.
Location where your graph will be created.
info
shows number of used in other modules.verbose
contains array of modules which use that export.
Number of minimum dependencies to decide if exported functions is logged.
A filter function which will decide whether module is logged.