sindresorhus/stringify-object

Lib fails for runtime that supports only commonjs

Closed this issue · 1 comments

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

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

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