You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the Paddle SDK on our AWS Lambdas, and only need a couple endpoints. We don't deal with reports, looking up addresses and the like, but pulling in this package makes any kind of tree-shaking impossible.
Moving to a more composable SDK, where each endpoint or resource can be instantiated when needed, would reduce our bundle size.
What problem are you looking to solve?
The main Paddle SDK is using a class-based approach, that creates all nested resources internally. This means that all resources will be bundled, whether they're needed or not.
I would prefer if each resource could be created with a reference to the main Paddle instance itself. That way one can pick and choose which bits to keep.
We also do event processing on our end (via webhooks), but only care about specific events. However, the event handling requires all event types to be bundled in our final output - even the ones we don't care or listen to.
Hi @spaceemotion,
Thank you for raising this feature request.
Given that V8 engines are pretty fast at parsing code, we are not sure how much benefit we might get out of tree-shaking our library, as it is all application code without any dependencies. With that said, I guess any benefit is good when it comes to lambdas.
I will give it some more thought and will make some tweaks to help with tree shaking without sacrificing the developer experience of the package.
In the meantime, please feel free to reach out to us if you need any other help.
Tell us about your feature request
We are using the Paddle SDK on our AWS Lambdas, and only need a couple endpoints. We don't deal with reports, looking up addresses and the like, but pulling in this package makes any kind of tree-shaking impossible.
Moving to a more composable SDK, where each endpoint or resource can be instantiated when needed, would reduce our bundle size.
What problem are you looking to solve?
The main Paddle SDK is using a class-based approach, that creates all nested resources internally. This means that all resources will be bundled, whether they're needed or not.
I would prefer if each resource could be created with a reference to the main Paddle instance itself. That way one can pick and choose which bits to keep.
We also do event processing on our end (via webhooks), but only care about specific events. However, the event handling requires all event types to be bundled in our final output - even the ones we don't care or listen to.
Additional context
Some suggestions:
Adding hints for certain methods being pure or without side-effects might also help.
How important is this suggestion to you?
Important
The text was updated successfully, but these errors were encountered: