Show Bundlephobia or similar browser size stats on package pages #128441
Replies: 0 comments 9 replies
-
Very interesting! There have been a number of great suggestions about surfacing more details about packages on the website, seems like it might be reasonable to think about this holistically and perhaps do a larger redesign. https://github.com/pastelsky/bundlephobia Turns out the bundlephobia is on Github with a permissive license. |
Beta Was this translation helpful? Give feedback.
-
I would very strongly prefer not to include this information; bundlephobia is a very rough estimate that often gives an inflated size - bundle sizes can't effectively be estimated without the full context of the app, including deduped dependencies and various optimizations that the user's specific bundler choice might apply. |
Beta Was this translation helpful? Give feedback.
-
hey @markerikson it looks like @bnb opened a discussion for a slightly higher level idea for "npm scores". Would you be open to considering this specific discussion "answered" and move the discussion to https://github.com/npm/feedback/discussions/66 where we can discuss the variety of ways we can "score" an npm package |
Beta Was this translation helpful? Give feedback.
-
Mmm... not entirely? I would see "scores" as a separate thing, that might take bundle size into account as an input metric. Like, a package could have an "87% score", but for this particular question I just want to know it adds "27K min / 12.3K min+gz" as a starting idea of how much it's going to add to my bundle. |
Beta Was this translation helpful? Give feedback.
-
The NPM package pages currently show the unzipped size of a package on disk. This is useful if you're targeting Node or want to get a sense of how big your
node_modules
will be in general, but it doesn't relate at all to how much size a library might add to a browser bundle.Bundlephobia ( https://bundlephobia.com/ ) is an excellent tool that tries to estimate the size of packages when used in a browser. I would really like to see the Bundlephobia stats integrated into NPM package pages.
Beta Was this translation helpful? Give feedback.
All reactions