magic-js
magic-js copied to clipboard
Add preload option to Magic constructor to prevent preloading css when using a custom UI
✅ 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:

💻 Examples
My proposal is something like this to prevent preloading UI assets:
new Magic('pk_live_something', {
preload: false // To prevent preloading default UI
});
NextJS example app for Magic prints a lot more preload warnings on every page load:
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.
hey there! is there any update on this? @am-hernandez