rollup-plugin-filesize-check

0.0.2 • Public • Published
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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    5
  • 0.0.1
    49

Package Sidebar

Install

npm i rollup-plugin-filesize-check

Weekly Downloads

11

Version

0.0.2

License

MIT

Unpacked Size

9.08 kB

Total Files

7

Last publish

Collaborators

  • spencermountain