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
7 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

W1NTΞR pfp
W1NTΞR
@w1nt3r
Ohh ok, thanks! This is more in line with what I'm seeing. The tree-shakeable viem/actions also makes a ton of sense, can't believe I didn't see it on the website
1 reply
0 recast
0 reaction