Skip to content

A rollup plugin to show file size of the bundle in the cli

Notifications You must be signed in to change notification settings

ritz078/rollup-plugin-filesize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-filesize

A rollup plugin to show filesize in the cli

Installation

npm install rollup-plugin-filesize

Usage

import { rollup } from 'rollup';
import filesize from 'rollup-plugin-filesize';

rollup({
  entry: 'main.js',
  plugins: [
    filesize()
  ]
}).then(...)

options

showMinifiedSize

type: boolean default: true

Whether to show minified size or not

showGzippedSize

type: boolean default: true

Whether to show Gzipped size or not

showBrotliSize

type: boolean default: false

Whether to show Brotli size or not

format

type : object

default : {}

See the options here

render

type : function

return the command that you want to log. Eg:

filesize({
	render : function (options, bundle, { minSize, gzipSize, brotliSize, bundleSize }){
		return minSize;
	}
})

theme

type: string

default : 'dark'

options : 'dark'/'light'

choose based on your terminal theme.

License

MIT