walletconnect-utils icon indicating copy to clipboard operation
walletconnect-utils copied to clipboard

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

Open nlnw opened this issue 1 year ago • 2 comments

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?

nlnw avatar Mar 18 '24 23:03 nlnw

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?

ganchoradkov avatar Mar 19 '24 14:03 ganchoradkov

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

nlnw avatar Mar 23 '24 21:03 nlnw