stripe / stripe-apps

Stripe Apps lets you embed custom user experiences directly in the Stripe Dashboard and orchestrate the Stripe API.
https://stripe.com/docs/stripe-apps
MIT License
147 stars 72 forks source link

Tree-shakeable Stripe SDK #817

Open dariodjuric opened 1 year ago

dariodjuric commented 1 year ago

While working on Stripe apps, we've noticed that the bundle size of the packaged app (ext.js) is large and a lot of space is taken by the Stripe SDK, which doesn't appear to be tree-shaked. Is there a way to make it more tree-shakeable so that only the parts of the Stripe SDK that are actually used by the app are bundled?

tobiasr commented 1 year ago

We are hit by this. We're only using the stripe.apps.secret part of the SDK, but it increases our app bundle size to a point where we're past the size rules for uploading the app. So, for us, its right now critical to lower the bundle size and the SDK is part of that.