cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Investigate 'pako' dependency size / tree shaking

Open rkalis opened this issue 3 months ago • 0 comments

@mainnet-pat reached out and sent us this message:

Fyi guys, changing

import { deflate } from 'pako';

to

// @ts-ignore
import pako from 'pako/dist/pako_deflate.es5.min.js';
const deflate = pako.deflate;

makes the dep better tree shakeable and reduces the bundled dep from 130kb rendered, 35kb gzipped to 28kb rendered, 9kb gzipped as seen in the output of cashonizes yarn build dependency visualizer

We should take a look at this to see if we can reduce the build size a bit.

rkalis avatar Nov 13 '25 09:11 rkalis