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:
| exportdefault{ |
| 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.
Issue
The
utilspackage 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
Ideas for improvement