Re:What's TypeScript compiling? Use a treemap to find out
by judge2020 on Monday August 01, 2022 @10:41AM
(#32306632)
AWS used to have this problem, which is why their JS framework now recommends only installing and importing parts of the API you need: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-...
[ Parent
| on HN ]
Re:What's TypeScript compiling? Use a treemap to find out
by hinkley on Monday August 01, 2022 @01:06PM
(#32309058)
You still have to police your coworkers to keep them from importing the whole goddamned thing just for the auth or s3 code...
Re:What's TypeScript compiling? Use a treemap to find out
by richthegeek on Monday August 01, 2022 @01:21PM
(#32309244)
That's what a linter is for!
Re:What's TypeScript compiling? Use a treemap to find out
by kclay on Monday August 01, 2022 @07:24PM
(#32313410)
What linting rule would enforce this?
Re:What's TypeScript compiling? Use a treemap to find out
by SpikeMeister on Monday August 01, 2022 @07:44PM
(#32313577)
I've used this one: https://eslint.org/docs/latest/rules/no-restricted-imports
Re:What's TypeScript compiling? Use a treemap to find out
by kclay on Wednesday August 03, 2022 @09:08AM
(#32331198)
Thanks
Re:What's TypeScript compiling? Use a treemap to find out
by underyx on Monday August 01, 2022 @09:43PM
(#32314303)
I use a custom Semgrep rule for it.
Re:What's TypeScript compiling? Use a treemap to find out
by quackware on Monday August 01, 2022 @10:50AM
(#32306756)
And yet aws cdk has migrated to a monopackage design :(
Re:What's TypeScript compiling? Use a treemap to find out
by sondr3 on Monday August 01, 2022 @11:05AM
(#32307003)
You will rarely, if ever, deploy an application running CDK, so the bundle size is more or less irrelevant. It’s basically a glorified YAML compiler used to bundle infrastructure.