Types are packaged/exposed incorrectly
Your Environment
- jsSHA version: 3.3.1
- JavaScript engine and version: Node 18.17.1
- How was jsSHA imported (ESM or other): all? TS/ESM for sure.
Describe the bug
https://arethetypeswrong.github.io/?p=jssha%403.3.1
Code
import jsSHA from 'jssha/dist/sha1'; // just an example
Additional context
I know, I know - the CJS/ESM/types situation is a mess across the ecosystem right now. 😢 I'll try to play around with a solution if I get the chance, just wanted to raise an issue to get the ball rolling.
Sigh...
It sounds like from the rollup documentation that it is impossible to have the same style import for both ESM and UMD/CJS. I'm totally open to accepting a solution for this but revisiting these problems every 6 months is draining me :\
Sigh...
It sounds like from the rollup documentation that it is impossible to have the same style import for both ESM and UMD/CJS. I'm totally open to accepting a solution for this but revisiting these problems every 6 months is draining me :\
I know, it's exhausting. I'll try to find some time to take a hard look at it for this package, but if anyone else knows what they're doing and wants to take a stab at it, please do. 🙏