The @ledgerhq package, specifically the @ledgerhq/cryptoassets/lib-es/data/evm directory, takes up a significant proportion of web's bundle size.
We should lazy load this package so that it's only loaded by the client when a user is attempting to connect a Ledger (or even when the "Connect wallet" modal is loaded if the former is not possible.
Overview
The
@ledgerhq
package, specifically the@ledgerhq/cryptoassets/lib-es/data/evm
directory, takes up a significant proportion ofweb
's bundle size.We should lazy load this package so that it's only loaded by the client when a user is attempting to connect a Ledger (or even when the "Connect wallet" modal is loaded if the former is not possible.
References and additional details
Spawned from the spike into web's bundle size: https://github.com/shapeshift/web/issues/7768
Run
yarn analyze
to generate a visual representation of the bundle.Acceptance Criteria
The
@ledgerhq
package is not included in theweb
bundle.Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response