Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types are packaged/exposed incorrectly #104

Open
wKovacs64 opened this issue Sep 15, 2023 · 2 comments
Open

Types are packaged/exposed incorrectly #104

wKovacs64 opened this issue Sep 15, 2023 · 2 comments

Comments

@wKovacs64
Copy link
Contributor

wKovacs64 commented Sep 15, 2023

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.

@Caligatio
Copy link
Owner

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 :\

@wKovacs64
Copy link
Contributor Author

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. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants