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

Lib fails for runtime that supports only commonjs #79

Closed
PatrykMilewski opened this issue Jun 30, 2023 · 1 comment
Closed

Lib fails for runtime that supports only commonjs #79

PatrykMilewski opened this issue Jun 30, 2023 · 1 comment

Comments

@PatrykMilewski
Copy link

Hello,

When trying to use this lib with Jest, it fails because you are using ESM syntax (import [...] from '[...]')

Would you consider exporting it in a fashion, that supports both CommonJS and ESM?

An article about the problem and how it should be done:
https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html

@sindresorhus
Copy link
Member

No plans to do that. The problem is your Jest config.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
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