web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[feature] Reduce Bundle Size (>1MB added for magic.link)

Open trevormil opened this issue 1 year ago • 2 comments

What problem does this new feature solve?

Currently, the newer versions of the Web3Modal add >1MB to the client bundle size for NextJS applications. This is resulting in decreased performance, especially for mobile page loads.

Note: Not sure if it is in the core bundle or not. I am getting ~1MB of network payload added to my site though via the Chrome Dev Tools -> Lighthouse tool.

Also side note: I also get the message that they are served without a cache policy which means my site is fetching 1MB extra every page load.

Describe the solution you'd like

It seems like a lot of it is coming from the magic.link bundle. I do not know if this is on purpose or what all is necessary. v4 and before were fine and didn't add (or didn't add much) to the bundle size and network payload.

image

trevormil avatar Jul 07 '24 22:07 trevormil

Any update on this? I would prefer if magic.link was disabled by default.

In the meantime you can disable the integration and prevent any requests to magic.link by setting email: false in your wagmi config.

auth: {
  email: false,
},

See https://docs.walletconnect.com/appkit/next/onboarding/socials

maggo avatar Aug 09 '24 11:08 maggo

You can disable magic as per the above - closing

arein avatar Dec 12 '24 04:12 arein