Content pfp
Content
@
0 reply
0 recast
0 reaction

W1NTΞR pfp
W1NTΞR
@w1nt3r
What am I doing wrong? I thought viem should be lighter viem @ 2.21.39 bundling with vite Searched all imports, tldr: import { base } from "viem/chains"; import { Address, formatEther, parseAbi, createPublicClient, createWalletClient, custom, http, publicActions, keccak256, toHex } from "viem";
3 replies
0 recast
29 reactions

jxom  pfp
jxom
@jxom
Analyzer probably isn't tree-shaking properly. I get 61kB on my repro with your imports (screenshot 1). If you're really worried about bundle size, you can also use tree-shakable actions with `createClient` (screenshot 2): https://viem.sh/docs/clients/custom#tree-shaking
1 reply
0 recast
3 reactions

pugson pfp
pugson
@pugson
tagging the homies @jxom @awkweb
0 reply
0 recast
2 reactions

Joaquim Verges pfp
Joaquim Verges
@joaquim
we made the API tree shakeable by default in the latest /thirdweb SDK, try it out to compare! Viem's tree shakeable actions are also good, but yeah not really advertised much.
0 reply
0 recast
0 reaction