magic-js icon indicating copy to clipboard operation
magic-js copied to clipboard

Add preload option to Magic constructor to prevent preloading css when using a custom UI

Open W4G1 opened this issue 4 years ago • 1 comments

✅ Prerequisites

  • [ x] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
  • [ x] Are you reporting to the correct repository (magic-sdk)?

✨ Feature Request

Add a preload option to the Magic constructor to optionally preload UI assets. Currently when you don't want to use the default UI, you can use showUI: false on loginWithMagicLink(), but the UI has already been preloaded before that function can be called.

🧩 Context

Evidence of magic instance preloading UI assets when constructed:

image

💻 Examples

My proposal is something like this to prevent preloading UI assets:

new Magic('pk_live_something', {
  preload: false // To prevent preloading default UI
});

W4G1 avatar Nov 10 '21 17:11 W4G1

NextJS example app for Magic prints a lot more preload warnings on every page load:

Screenshot 2022-04-14 at 10 30 01

vertti avatar Apr 14 '22 09:04 vertti

Thank you @W4G1 for the feature request. I have added this to our feature request log so that our team can discuss adding this feature to the roadmap.

am-hernandez avatar Sep 07 '22 21:09 am-hernandez

hey there! is there any update on this? @am-hernandez

yulafezmesi avatar Mar 27 '24 12:03 yulafezmesi