Skip to content

Utils package tree shaking #1015

@alexandre-abrioux

Description

@alexandre-abrioux

Issue

The utils package makes use of a default export, meaning that user code applications have to import the whole package even when using a small portion of it:

export default {
SimpleLogger,
amount,
cachedThrottle,
crypto,
encryption,
identity,
retry,
signature,
...providers,
...utils,
...bignumbers,
};

Ideas for improvement

  • Replace the default export with named exports. This will allow for better tree shaking, lowering the build size of user code applications.
  • Enforce the no-default-export ESLint rule.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions