egoist / package-size

Get the bundle size of an npm package.
MIT License
425 stars 26 forks source link

Add support for ES6 packages #4

Closed fregante closed 6 years ago

fregante commented 7 years ago

UglifyJS isn't ES6+ compatible, for example:

$ package-size zooming

ERROR in zooming.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [zooming.js:86,30]

A possible solution would be using babili

egoist commented 7 years ago

sounds reasonable, I might add this later (PR welcome), currently you can use --es6 option to get the size of compiled file.

fregante commented 7 years ago

Ah, that's not bad either. I had RTFM and then promptly forgot about it :D

fregante commented 6 years ago

Works now! Thanks :)

$ package-size lodash-es

  package            size     minified  gzipped
  lodash-es@4.17.10  1.76 MB  100 kB    31.6 kB