-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Description
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:
requestNetwork/packages/utils/src/index.ts
Lines 16 to 28 in 8ff7690
| 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.
Reactions are currently unavailable