antonmedv / jsize

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

Node target issues. #42

Closed DylanPiercey closed 7 years ago

DylanPiercey commented 7 years ago

Although I was initially for --target node I have run into quite a few caveats and honestly think it's not that useful.

Heres some issues:

1) Does not support native modules / deps. 2) Does not support dynamic requires. 3) People typically don't care about node module build sizes, but the actual install sizes.

Heres what I propose:

1) Add another column in verbose mode (package size) which shows the tarbal size of the module which is more useful for node deps. 2) Change --target functionality to be more browser specific and start using babel-preset-env.

For 2 this would allow users to do stuff like --target ["last 2 versions"] and --target ["Chrome"] which I think is far more useful.

Curious on your thoughts here @antonmedv.

antonmedv commented 7 years ago

I agree what this is a bit complicated and users will not use this feature at all. Only jsize something.

Add another column in verbose mode (package size) which shows the tarbal size of the module which is more useful for node deps.

I think this can confuse users a lot, as there is already initial size.

Change --target functionality to be more browser specific and start using babel-preset-env.

This is a loot more complicated, I think maybe remove target at all? Less options == better DX.

And maybe stick with UNIX philosophy: Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".

DylanPiercey commented 7 years ago

Yeah, at any rate I think we should remove the --target option for now and perhaps add the compilation targets for browsers later, or perhaps just leave it.