antonmedv / jsize

Find out minified and gzipped npm package size
MIT License
178 stars 12 forks source link

Don't count peerDependencies towards bundle size #7

Closed gaearon closed 7 years ago

gaearon commented 7 years ago

And generally fix builds for packages with peer dependencies. Fixes https://github.com/antonmedv/jsize/issues/6.

gaearon commented 7 years ago

Rationale: users expected that app bundle size = app size alone + sum of sizes of direct dependencies. So we shouldn’t count them twice.

gaearon commented 7 years ago

(this is ready for review)

DylanPiercey commented 7 years ago

Great job on this PR, very clean. I was just working on the same thing but I'll merge yours instead :D. Thanks for your help today!

gaearon commented 7 years ago

Thanks! Feel free to refactor 😛 I'm not sure I fully understand the resolving logic so I did the simplest thing I could make work.