Skip to content

Consider adding exports for individual files #167

@mcmire

Description

@mcmire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions