Reduce Bundle Size: Make `initia.js` a peer dependency (like `@aptos-labs/ts-sdk`)
The surf package bundle size has increased significantly due to initia.js being included as a direct dependency.
This contrasts with @aptos-labs/ts-sdk, which is correctly listed as a peer dependency. For users only needing Aptos support, the bundled initia.js adds unnecessary bloat.
Could initia.js also be changed to a peer dependency? This would align the handling of chain-specific SDKs and allow consumers to only install/bundle initia.js if they actually need Initia functionality, keeping the core package lean for single chain users.
@itsmnthn honestly, I don't think simply make it as peer dependency can resolve this issue. Because initia is used in the function like "view". Even if I make it peer dependency, if the user doesn't install "initia.js", there would be some build error.
To resolve this, we need to export a different folder:
- A folder with functions for aptos only, no initia dependency.
- A folder with functions for both aptos and initia.
But I don't have much time to work on this recently. Feel free to contribute if anyone is interested; it shouldn't be too complex.