jsr icon indicating copy to clipboard operation
jsr copied to clipboard

feature request: show package size

Open scarf005 opened this issue 4 months ago • 1 comments

it's hard to figure out which package is lighter. having built-in display for package size such as https://packagephobia.com or https://bundlephobia.com could be useful.

scarf005 avatar Aug 19 '25 06:08 scarf005

I think displaying raw package size in KBs can be very misleading. Any good bundler will tree-shake unused code out of the bundle if the package is optimized for it. So a package that is larger in size might result in less KBs in your bundle than a smaller package that can't be tree-shaked.

A download size, maybe, but that can also vary on how well gzip can do its work, so I would be comfortable linking any decisions to it.

I also believe that encouraging the publishing of minified code to reduce package size is a bad idea.

Ionaru avatar Aug 19 '25 07:08 Ionaru