-
Notifications
You must be signed in to change notification settings - Fork 45
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
ESModules? #90
Comments
@jack3898, it would be great if you could contribute with ESM support! |
The only question I have is, for backwards compatibility sake I think the best potential way we could go about it is to create an indexv2.mjs (mjs is important) file with the module in it which may mean duplicated code. Or the export in indexv2.js can be changed to a named export (amending the declaration file as well). 😔 Well that's from my experience anyway. Maybe you might (or might not!) want to go the hard direction that the popular package "chalk" did where they deprecated cjs modules and made their next major release esm only. Same with superjson I think. But more and more packages seem to be pushing for it but lots of projects still rely on cjs. What do you think about all of this? Any direction you want to take? There's a few ways to go about it, all with their pros and cons. |
@jack3898 thank you for the proposal. Let's add GPT-4 into our loop.
|
Hey, I found your tool really useful for my project that utilises an LRU cache! Thanks 😄
But, my project uses ESM, and the default export in your package does not work (my solution so far was to copy the indexv2.js locally into my project and adapt it for ESM).
What are your thoughts on ESM, is there something you would be open for me to contribute that helps with ESM support? :)
Jack
The text was updated successfully, but these errors were encountered: