In cases where AccountModal or ChainModal aren't used, their code is still fully bundled by webpack.
The worst "offender" is the normalize function viem reexports (at 25kb gzipped), which is (probably?) imported RainbowKitProvider -> ModalProvider -> AccountModal -> useProfile -> useMainnetEnsAvatar-> safeNormalize.
Expected Behavior
Rainbowkit should allow for the configuration of used/unused features, and structuring the code in such a way that disabled features are tree-shaked away.
Steps To Reproduce
No response
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
Is there an existing issue for this?
RainbowKit Version
2.1.2
wagmi Version
2.11.2
Current Behavior
In cases where
AccountModal
orChainModal
aren't used, their code is still fully bundled by webpack.The worst "offender" is the
normalize
function viem reexports (at 25kb gzipped), which is (probably?) importedRainbowKitProvider -> ModalProvider -> AccountModal -> useProfile -> useMainnetEnsAvatar-> safeNormalize
.Expected Behavior
Rainbowkit should allow for the configuration of used/unused features, and structuring the code in such a way that disabled features are tree-shaked away.
Steps To Reproduce
No response
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response