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

Consider adding exports for individual files #167

Open
mcmire opened this issue Jan 23, 2024 · 0 comments
Open

Consider adding exports for individual files #167

mcmire opened this issue Jan 23, 2024 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Jan 23, 2024

As time has grown, this package has grown to include a lot of different types of utilities. That's great, but at the same time, the size of this package has grown as well:

Some projects may only need one or two utilities and may not wish to import this entire package to get them. If we get to a point where both extension and mobile support tree-shaking, then we don't have to worry about unnecessarily bloat, but in the meantime, we might consider creating an export for each file in the src/ directory (minus node.ts, which we've already done).

Before we go down this path, however, we should verify that this indeed would be a viable solution — i.e., that if we create a file-specific export, a project which uses this import would add far less to that project than it would in importing all of @metamask/utils.

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

No branches or pull requests

1 participant