-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Export the SDK as ESM Only #3447
Comments
I believe this is something we should adopt at some point, however the timing at the moment might not be right, let's see. |
@petertonysmith94 What are the pros and cons? I'm concerned about how this will affect our users. Maybe we could try a PoC with the FE guys (cc @LuizAsFight) as our first consumers and see if/what obstacles arise. |
Pros
Cons
SummaryFrom my experience from our down stream consumer (internal and ecosystem), most use ESM syntax. Most use modern frameworks w/ modern tooling, so the migrations shouldn't be too much of a problem IMO. It'd make sense to do a PoC with the FE people to identify any obstacles arise. Did you have anything in mind for this? |
@petertonysmith94 Great, thanks for the points. The Wallet would be a good start for a test like this. Should it be as easy as checking if an ESM-only package is already in use? |
So the wallet is already ESM complaint from what I know. I believe the best test would be to publish our packages with only ESM bundled, then switch over the consumer. |
Graet! If the other apps (explorer, etc.) are also ESM-compatible we may be good to go (internally, at least). Let's try to speak with @LuizAsFight to coordinate something. |
Unassigning as I'm not actively developing this right now and lots of conversations happening, someone is welcome to pick this up. |
Note
This topic is still up for discussion and is in issue format to perform the necessary investigation that impacts this issue.
As long as we are shipping in multiple formats (CJS & ESM) there are a few associated risks and hinderances that over time have been impacting development (1), and our confidence in what we are delivering (1, 2).
Recently we are seeing some packages migrate to shipping ESM only. Given Node
v22
now has native support for ESM this could also be a good time for us to migrate. Other benefits include:However, we cannot underestimate the impact this could have on consumers. As we've experienced, it's fustrating when a package upgrades and adopts ESM only and we face unnecessary pain to integrate it, or have to find another viable option.
Firstly, we should carry out an investigation on our front-end applications (explorer, wallet etc.) and the wider eco-system to understand impact. I'll add further tasks to the below list as this issue develops.
Tasks:
The text was updated successfully, but these errors were encountered: