Skip to content
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

Open
2 tasks
danielbate opened this issue Dec 5, 2024 · 1 comment
Open
2 tasks

Export the SDK as ESM Only #3447

danielbate opened this issue Dec 5, 2024 · 1 comment
Assignees
Labels
chore Issue is a chore

Comments

@danielbate
Copy link
Contributor

danielbate commented Dec 5, 2024

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:

  • Removal of a lot of build infra
  • Simplified ESM only tooling and we can use ESM only dependencies
  • Ship the same code to consumers that we are writing (no CJS transpilation)
  • No more masqueraded ESM types

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:

  • Investigate ESM only integration with FE applications
  • Investigate ESM only integration within the eco-system (via Fuel Builders).

I've tried to keep this issue pretty clean, but there are some interesting discussions around adopting ESM only here (1, 2, 3).

@danielbate danielbate added the chore Issue is a chore label Dec 5, 2024
@danielbate danielbate self-assigned this Dec 5, 2024
@danielbate
Copy link
Contributor Author

I believe this is something we should adopt at some point, however the timing at the moment might not be right, let's see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

No branches or pull requests

1 participant