4 ms·
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.c
by judge2020 4y ago
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-guide/migrating-to-v3.html https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-...
- quackware 4y agoAnd yet aws cdk has migrated to a monopackage design :( https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html
- sondr3 4y agoYou 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.
- oneplane 4y agoNot only that, but you'll also not really be running it anywhere that isn't "on AWS", like a browser.
- crazysim 4y agoThe cloudformation job will more than likely dwarf the tsc overhead from cdk stuff being a mono package.
- hinkley 4y agoYou still have to police your coworkers to keep them from importing the whole goddamned thing just for the auth or s3 code...
- richthegeek 4y agoThat's what a linter is for!
- kclay 4y agoWhat linting rule would enforce this?
- SpikeMeister 4y agoI've used this one: https://eslint.org/docs/latest/rules/no-restricted-imports https://eslint.org/docs/latest/rules/no-restricted-imports
- kclay 4y agoThanks
- underyx 4y agoI use a custom Semgrep rule for it.