-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
❔ Question
I just discovered the "sizes" drop-down in the dependencies panel:
In this example, date-fns is estimated at 17 KB, which is way too high - I'm only importing a single function from a submodule.
On the other hand, sinuous is estimated at 170 bytes, which is way too low - I've imported two submodules, so somewhere between 1.4 and 4.5 KB.
Just wondering, what are these sizes based on?
Maybe it doesn't work for packages with submodules? Those are becoming increasingly common, and people who are mindful of package footprint are likely using submodules to control how much they import and bundle.
I tried bundlephobia, and it also gets the size of these modules wrong - but CS actually has access to information from the build tool, right? So I wonder if it's possible to more accurately measure the net size of contributions from actually imported submodules and summarize by package? I'm pretty sure I've seen some webpack modules that provide more accurate stats?
