-
Notifications
You must be signed in to change notification settings - Fork 1.3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Investigate tree-shakeability of our umbrella fuels
package
#1460
Comments
Currently as it is, our packages satisfy the main requirement of tree-shakeability, which is that we are generating ESM javascript. However, our packages suffer from three problems that cause suboptimal tree-shakeability:
The biggest bang for the buck would be solving the problems in the order above. Other things worthy of mentioning:
|
Cross-referencing with:
|
Thanks for your investigations so far. 🙏 Before deciding on a path forward, we should try assembling a table with:
The goal is to have a quick glance at the trade-off between Note
|
Listing the dependencies that I remember off the top of my head (not a final list):
A lot of the issues related to tree-shakeability will be solved by fixing problematic dependencies. The packages that would most benefit from removing those dependencies are listed in #1461. We shouldn't spend time analyzing them until we solve the dependencies problem first because we won't know the state of our code properly until then. It's arduous to go through the generated code, and trying to analyze our own faults while lots of non-treeshakeable dependency code surrounds it just adds to the difficulty. |
These two issues seem a bit overlapping. Can we merge them and have a final report to look at? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
From this comment:
For example, our
demo-react-vite
app has this import statement:import { BaseAssetId, encrypt, decrypt } from "fuels";
, but the impact on bundle size is +187kB, which is too much for such simple imports.The text was updated successfully, but these errors were encountered: