You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issues like #1956 indicate bundle size is out of control.
Tools are available for analyzing bundle size. Size analysis could be diffed in CI to prevent unexpected ballooning of deployment artifacts.
vite-bundle-visualizer can easily visualize bundle size. default visualization attached below
it's apparent that the larger fraction of minifront bundle size relates to cosmos packages used for ibc. notably, the bundled content of @injectivelabs/core-proto-ts contains duplicated ESM and CJS trees. assuming a preference for ESM, this means there is 5.44MB of dead CJS code in the bundle from core-proto-ts alone.
obvious size wins:
deduplicate esm/cjs trees everywhere
deduplicate protobufs between peers
omit chain registry testnet data from production build
use the 'minimal' version of interchain ui kit
some peer deduplication might be achieved by aligning dependency versions, or by package manager overrides (though overrides may be dangerous).
The text was updated successfully, but these errors were encountered:
Issues like #1956 indicate bundle size is out of control.
Tools are available for analyzing bundle size. Size analysis could be diffed in CI to prevent unexpected ballooning of deployment artifacts.
vite-bundle-visualizer
can easily visualize bundle size. default visualization attached belowit's apparent that the larger fraction of minifront bundle size relates to cosmos packages used for ibc. notably, the bundled content of
@injectivelabs/core-proto-ts
contains duplicated ESM and CJS trees. assuming a preference for ESM, this means there is 5.44MB of dead CJS code in the bundle from core-proto-ts alone.obvious size wins:
some peer deduplication might be achieved by aligning dependency versions, or by package manager overrides (though overrides may be dangerous).
The text was updated successfully, but these errors were encountered: