UNPKG

rollup-plugin-webpack-stats

Version:

[![](https://img.shields.io/npm/v/rollup-plugin-webpack-stats.svg)](https://www.npmjs.com/package/rollup-plugin-webpack-stats) [![](https://img.shields.io/npm/dm/rollup-plugin-webpack-stats.svg)](https://www.npmjs.com/package/rollup-plugin-webpack-stats)

20 lines (19 loc) 772 B
import type { Plugin, OutputOptions } from 'rollup'; import { type StatsOptions } from 'rollup-plugin-stats/extract'; import { type BundleTransformOptions } from './transform'; import { type StatsWrite } from './write'; type WebpackStatsOptions = { /** * JSON file output fileName * default: webpack-stats.json */ fileName?: string; /** * Custom file writer * @default - fs.write(FILENAME, JSON.stringify(STATS, null, 2)); */ write?: StatsWrite; } & Omit<StatsOptions, "source" | "map"> & BundleTransformOptions; type WebpackStatsOptionsOrBuilder = WebpackStatsOptions | ((outputOptions: OutputOptions) => WebpackStatsOptions); export declare const webpackStats: (options?: WebpackStatsOptionsOrBuilder) => Plugin; export {};