by MitchellCash · 4y ago · 0 comments
I find it interesting that one of the reasons given for the reduction in package size is due to such a simple indentation change from 4 spaces to 2 spaces.
Not interesting that 2 bytes are less than 4 bytes, rather, TypeScript is a large project and it would be interesting to know how much size was saved from this one specific change? Seems like a trivial change, so why not do it sooner? And assuming readability isn't required in the bundle output why not bundle with no indentation at all and put everything on a single line, would this not be even smaller again?
Re: indentation: Literally, no one thought of it, as far as anyone can tell. Linus's law appears to have its limits.
I think it's probably correct to laugh this off though. Why would you care about the non-minified/gzipped size this much?