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 ESM #22

Open
sindresorhus opened this issue Apr 5, 2021 · 2 comments
Open

Support ESM #22

sindresorhus opened this issue Apr 5, 2021 · 2 comments

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Apr 5, 2021

We need to wait for the loader hooks to be stable first: https://nodejs.org/dist/latest/docs/api/esm.html#esm_hooks

nodejs/node#49442

@aral
Copy link

aral commented Sep 9, 2022

This is easy to implement but imperfect currently (see https://github.com/small-tech/import-fresh#readme) as Node.js cannot currently invalidate ESM modules without leaking memory.

@legobeat
Copy link

legobeat commented May 4, 2023

Most recent update from Node.js team: nodejs/node#49442

API stabilizing seems to not be happening any time soonish and there are some workarounds mentioned which may be appplicable here in the meantime?

nodejs/node#49442

https://gist.github.com/marxangels/68c1e50fe144c4ec4c911a6534aa7e32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants