You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
pkg-size
reports a total size (including dependencies) of 4.5MBSome 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 (minusnode.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
.The text was updated successfully, but these errors were encountered: