Closed jeetiss closed 1 year ago
This is happening a result of esbuild creating unused chunks when splitting
is enabled:
https://github.com/evanw/esbuild/issues/3252
I'm relying on splitting
as a performance benefit to get the exports and also do the initial build at the same time, so it's difficult to disable right now.
I disabled splitting
so you should be able to see accurate results:
tree-shaking doesn't work for some reason, so it is impossible to test anything
size of
hexToString
fromviem
package with pkg-size is87KB
, but it is wrong https://pkg-size.dev/viem👉🏻 snapshot
size of
hexToString
fromviem
package with bundlejs is3.63 kB
, and it is close to true https://bundlejs.com/?q=viem&treeshake=%5B%7BhexToString%7D%5D👉🏻 snapshot