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

Support also CommonJS #50

Closed
jfoclpf opened this issue Mar 26, 2024 · 2 comments
Closed

Support also CommonJS #50

jfoclpf opened this issue Mar 26, 2024 · 2 comments

Comments

@jfoclpf
Copy link

jfoclpf commented Mar 26, 2024

Do you think it would be possible to accept also CommonJS?

const QuickLRU = require('quick-lru')

I can make the PR if it's ok for you.

We have a huge project that started with CommonJS; moving everything to ESM would be a big hassle, and node doesn't allow to combine both.

Thank you

@sindresorhus
Copy link
Owner

https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2024
@jfoclpf
Copy link
Author

jfoclpf commented Mar 26, 2024

@sindresorhus

option --experimental-detect-module is not yet available

in the meantime do you suggest any workaround?

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