5 comments

[ 3.0 ms ] story [ 20.5 ms ] thread
They accomplished this by removing Typescript source code, comments from compiled JS, and source maps. Package already had tree shaking configured.
Improvements like these are always welcome, but this update sounds a bit like cargo culting. If you're reducing size without cutting dependencies, or simplifying the code, but merely by removing comments and debug information from sources + source maps, is it really improving anything for customers? This library runs mostly on NodeJS and React Native where this will just degrade the debugging experience.

Most importantly, the size reduction from 1MB to 500KB pre-install is meaningless for browser environments, where it matters the most. As you can see from bundlephobia, the delivered library size stays exactly the same: https://bundlephobia.com/package/@aws-sdk/client-sts@3.37.0

Wait so they removed al JSDoc comments for versions 3.36 and up and proper debugging capabilities?

I get reducing bundle size and all but won't this cause a massive degredation in development experience? How about a flag to choose?

If you're having trouble with node_modules size, do yourself a favour and try PNPM[0]. It's another npm/yarn. It installs each npm module into a local store first, then creates a bunch of hardlinks and symlinks in your project's node_modules. End result, no matter how many duplicate dependencies you have installed (for example this AWS SDK), you only store one of them on your disk. Plus, it's super fast.

[0] https://pnpm.io/

But did you give your employees bathroom breaks yet?