size-plugin-core

core module for size-plugin

  • Types
  • ESM
  • CJS
License
MIT
Install Size
24.8 kB(5.7 MB)
Vulns
22
Published

Get started

$npm install size-plugin-core
$pnpm add size-plugin-core
$yarn add size-plugin-core
$bun add size-plugin-core
$deno add npm:size-plugin-core
$vlt install size-plugin-core
$vp add size-plugin-core

Readme

size-plugin-core

Core module for size-plugin/rollup-plugin-size

Options

Table of Contents
SizePluginCore

SizePluginCore(options)

Parameters
  • options Object
    • options.compression string? compression method(gzip/brotli/none) to use, default: 'gzip'
    • options.pattern string? minimatch pattern of files to track
    • options.exclude string? minimatch pattern of files NOT to track
    • options.filename string? file name to save filesizes to disk
    • options.publish boolean? option to publish filesizes to size-plugin-store
    • options.writeFile boolean? option to save filesizes to disk
    • options.mode boolean? option for production/development mode
    • options.columnWidth number? option for add spacing in message
    • options.stripHash function? custom function to remove/normalize hashed filenames for comparison
Item
Properties
  • name string Filename of the item
  • sizeBefore number Previous size, in kilobytes
  • size number Current size, in kilobytes
  • sizeText string Formatted current size
  • delta number Difference from previous size, in kilobytes
  • deltaText string Formatted size delta
  • msg string Full item's default message
  • color string The item's default CLI color
Data
Properties
  • sizes Array<Item> List of file size items
  • output string Current buffered output