[HN Gopher] We halved the publish size of modular AWS SDK for Ja...
___________________________________________________________________
We halved the publish size of modular AWS SDK for JavaScript
clients
Author : kiyanwang
Score : 17 points
Date : 2021-10-16 08:48 UTC (14 hours ago)
(HTM) web link (aws.amazon.com)
(TXT) w3m dump (aws.amazon.com)
| tppiotrowski wrote:
| They accomplished this by removing Typescript source code,
| comments from compiled JS, and source maps. Package already had
| tree shaking configured.
| ricardobeat wrote:
| 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
| zebracanevra wrote:
| 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/
| xanmanza wrote:
| 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?
___________________________________________________________________
(page generated 2021-10-16 23:02 UTC)