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

Why not to support both ESM and CommonJS? #19

Closed
stepaniukm opened this issue Feb 25, 2023 · 2 comments
Closed

Why not to support both ESM and CommonJS? #19

stepaniukm opened this issue Feb 25, 2023 · 2 comments

Comments

@stepaniukm
Copy link

Hi! Thanks for your awesome work regarding modern-errors, but I have a one problem with this library. It just doesn't work without ESM completely. I've seen this issue #3 and I get your points, but I wonder why it's not possible for a library to support temporarily both CommonJS and ESM. I would love to use this library in my project, but due to it's dependencies it's impossible to migrate towards pure ESM setup. I tried it, but I encounter like infinite flow of bugs in deps.
image
Here is a screenshot from another library that just handles it well.

@ehmicky
Copy link
Owner

ehmicky commented Feb 25, 2023

Hi @stepaniukm,

Thanks for your feedback. However, as you mentioned, this is a duplicate of #3, so the answer to your question is described in that other thread. In particular, this comment and the section called "Double packaging" explains the main problem being providing support for both ESM and CommonJS, but other parts of the thread provide with some additional points.

@ehmicky ehmicky closed this as completed Feb 25, 2023
@stepaniukm
Copy link
Author

stepaniukm commented Feb 25, 2023

Oh I kinda scrolled through and didn't notice your comment about double packaging. Thanks for your answer.

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