-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
library bloats build output with more than 100M #62
Comments
Here's a PR setting the dependencies all as peer: #63 I think the assumption I made when I wrote this library is that it would be included as a devDependency, hence these are dependencies? Are you including typesafe-dynamodb as a dep or dev-dep? Do you think I should also make these dependencies |
Hi, Thanks for your quick responses. Great job with the library! Regarding your comments: if we only used types we could I think this is still possible, and that many can probably use only parts of your library that only export types and thus still include the library as a However, when using parts that export code (constant vars, functions) such as With regard to the second issue: the inclusion of both V2 and V3 in the code. This is only of course important for those using the the code, not just types. No doubt that in this case should not force library clients to import such a huge library like aws-sdk (at any version) if they do not need it. BTW - we have experience lots of conflicts between aws sdk libraries and sub libraries and came to realize that its best to use the version provided with the aws runtime (e.g lambda environment) and not bring your own sdk dependecies. This is any additional reason when it Its best to avoid this nailing versions with aws and/or requiring to include the sdk in your code. |
Re-opening the issue since it was closed by previous PR. Want to check that there is not a lingering problem here.
Can you elaborate more? Is this solved by Also, I have been considering dropping the |
Go all in on V3 IMO |
The library forces a huge penalty of 100M that are not needed at all or just partially.
aws-sdk ~= 90M
If used by a lambda, none of the libs needed. If used by a server, only the version v2/v3 needed.
Probably the correct way is to ensure it loads correctly for the version we need.
Also, the dependencies should probably be peerdependcies.
The text was updated successfully, but these errors were encountered: