scttcper/ts-wcwidth

Reduce Install size issue by removing the module folder

ayonious opened this issue · 2 comments

@scttcper thanks a lot for the package. By noticing that there is no dependency I installed it in my package
console-table-printer

But after installing I realized there is some issues.

The install size is bigger than wcwidth

After looking in the installed package I found out there is a folder called modules to including almost 99% same code.

headerTitle_test_ts_—_console-table-printer

These things can be optimized to make it I think 40% of install size as its currently.

Hey i've cut a bunch out by dropping the sourcemaps that are mostly useless. The module entry point contains the same code but with es module exports making them easier to grab for things like rollup and webpack. It does double up size on disk when installed without being bundled

@ayonious if you want install size to stay small i'd recommend using rollup/webpack to bundle your dependencies and minify like you would for the frontend.