-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate elements to usage via CDN #317
Conversation
siddharthborderwala
commented
Aug 17, 2024
- Fixes the elements crash
- Migrate to using elements via UMD - read about differences and benefits here
- Use elements UMD types package for TS support
@baktun14 I have migrated elements to usage via CDN instead of using as an NPM package. It fixes the crash that's happening due to a Nextjs SWC minification issue. Some of the other benefits of the UMD build are
|
@baktun14 thank you for making a note of this. It's a bug with the stylesheet for elements version 1.4.1. We're releasing elements version 1.4.2 today/tomorrow which will have the fix for this. Will update then. |
Hi @baktun14 I have fixed the issue with the stylesheets. It won't affect the rest of the app. |
The styling issues seem to have been fixed. 👍 |
<link rel="stylesheet" href="https://unpkg.com/@leapwallet/[email protected]/dist/style.css" /> | ||
<script defer src="https://unpkg.com/@leapwallet/[email protected]/dist/umd/main.js" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of importing this globally when we only need it in the get started page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@siddharthborderwala Would it possible to import these dynamically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update on this? @siddharthborderwala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baktun14 will update this and push changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baktun14 I've made the required changes. Now the elements related CSS and JS will be loaded only on the /get-started
page.
@siddharthborderwala Hey, I rebased and fixed some issues, but for some reason the @leapwallet/elements package is still a dependency of the types packages and it messed up our CI... https://github.com/akash-network/console/actions/runs/10888482586/job/30213077526?pr=317 |