-
Notifications
You must be signed in to change notification settings - Fork 83
Description
🐛 Bug Description
You guys recently started including a package called script-composer-pack in your SDK, which contains a single 5MB file in its dist/esm (and dist/cjs). It appears to be some kind of WASM binary.
This is very wasteful and, as far as I can tell, not even necessary to include by default for all users of your SDK. Here is a bundle analysis of Wormhole Connect, a widget that can bridge between every Wormhole-supported blockchain. The section marked in red is this massive glob of binary data from Aptos' SDK.
This shows the scale of how large this thing is compared to other commonly used SDKs like Solana's web3.js and ethers.
Something should be done so that only people who need this feature of your SDK have to include it in their builds, or perhaps finding a more efficient way to distribute whatever this is. Right now this 5MB glob is being forced on anyone who uses aptos-ts-sdk.
How to reproduce
You can see this bundle analysis by cloning the wormhole-connect repo and running npm i; npm run analyze.
I don't have enough context to suggest a solution, but making this a separate export in aptos-ts-sdk's package.json exports would probably work.
