reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.92k stars 1.4k forks source link

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

Open trevormil opened 4 months ago

trevormil commented 4 months ago

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

linear[bot] commented 4 months ago

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

maggo commented 3 months ago

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