Show non-bundled size (total size on disk)
See original GitHub issueType
Feature Request
Request
Some npm packages are not meant to be bundled, such as test tools like ava
or tape
.
It would be great if bundlephobia could show the size on disk before bundling.
For example, ava and should show 24 MB but it shows 941 kB minified.
I created an issue in https://github.com/siddharthkp/cost-of-modules/issues/50 since it might be out of scope for bundlephobia.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How do I view the size of npm packages? - Stack Overflow
It shows size in interactive treemap. This helps you to find the size of package in your bundled file. Webpack Bundle Analyzer.
Read more >Selecting sizes for sparse bundles - The Eclectic Light Company
It's best to do this in consistent units such as MB: if your sparse bundle could reach 1.1 TB, that's 1,100 GB, or...
Read more >JavaScript performance beyond bundle size - Nolan Lawson
But I believe we focus on bundle size first and foremost because it's easy to measure. That's not to say that bundle size...
Read more >How do I determine the total size of a directory (folder) from ...
The command du "summarizes disk usage of each FILE, recursively for directories," e.g., du -hs /path/to/directory. -h is to get the numbers "human...
Read more >Verifying sufficient disk space for a VMware Fusion virtual ...
If you have multiple .vmdk files, add the size of each together to find the total size. For example purposes, let's say you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s what I came up with: https://github.com/styfle/packagephobia
@pastelsky
I’m glad you asked! 😃
This information is helpful to an average developer the same way that bundlephobia is helpful to an average front-end developer.
Now I don’t see a “WHY” section to explain the purpose of bundlephobia, but the GitHub subtitle says “Find out the cost of adding a new frontend dependency to your project”.
So my assumption is that bundlephobia is a tool to allow a front-end developer to do a quick comparison of npm package sizes which might affect which dependency you choose to put into your web app. For example, you would want to pick the 1 KB package over that 100 KB package if you had the choice (obviously there are other attributes you would want to look at to make this decision, not just size).
Currently, bundlephobia assumes that npm packages are destined for the browser and shows the size after bundling with webpack.
But that assumption is incorrect. Many packages (in fact node’s original purpose) is meant for back-end developers. It’s also increasingly becoming more popular to use npm packages for your build & test tools.
Now an astute back-end developer or dev ops would want to compare two unit test tools such as ava vs tape and see that ava is 10x larger.
Or how about a micro framework that is larger than it’s competitor zeit micro.
I’ll quote myself from that issue here:
So you see, size matters even for dependencies that are not going to be served to the front-end 😄