Skip to content

spencermountain/rollup-plugin-filesize-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-filesize-check

a small rollup plugin to ensure your build is approx the expected filesize.

image

npm i rollup-plugin-filesize-check --save-dev

then in rollup config:

import sizeCheck from 'rollup-plugin-filesize-check'

export default [
  {
    input: 'src/index.js',
    output: [{ file: 'builds/out.js', format: 'umd' }],
    plugins: [
      sizeCheck({
        expect: 95, // sizes in kb
        warn: 5 // acceptable diff (+/-)
      })
    ]
  }
]

looks best with rollup -c --silent flag

Options

  • expect (optional): the size, in kilobytes, you expect the builds to be
  • warn (optional): a difference (+/-), in kilobytes, that like to be warned of (with red text)

See also

MIT

About

Rollup plugin to ensure your build is approx the right size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published