WalletConnect / walletconnect-utils

Javascript Utilities for WalletConnect
MIT License
65 stars 56 forks source link

Remove "@react-native-async-storage/async-storage" dependency #164

Open nlnw opened 5 months ago

nlnw commented 5 months ago

This dependency adds 200MB to npm installs because it also pulls in react-native. It's more than 10x bigger than any other dependency. This makes anything that uses walletconnect as a package need 500mb+ in wasted storage. Can you please find a way to include this type of dependency without pulling in this package which pulls in react-native unecessarily?

ganchoradkov commented 5 months ago

Hey @nlnw, this dep is defined as peer and only downloaded in dev mode https://github.com/WalletConnect/walletconnect-utils/blob/master/misc/keyvaluestorage/package.json#L51 It shouldn't be present in prod builds. How are you measuring the bundle size?

nlnw commented 5 months ago

It's not present in the final bundle, but it's still a waste to make all developers download this giant dependency, especially since it's not even used (the next largest dependency is 10x smaller). I mostly pick this up through viem. You can see how big that dependency is through this tool: https://pkg-size.dev/viem