-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add ESM support #31
Comments
@BlackGlory just to get some more detail, is this the code you'd have in index.mjs? Or what's exactly your solution here?
|
@innazh Funnily enough, I was about to ask the same thing here but refreshed and saw your comment. So I think we're both working through this at the exact same time :) I just tried this and it seems to work:
|
@innazh I've stopped using this library, but my solution at the time should be similar to your code. Just read the source code of this library and make a fake module object suitable for it. |
Electron 28 already has ESM support, but the library doesn't work in ESM yet.
Here's my current solution based on making a fake
NodeModule
:Due to the lack of
module.children
, full ESM support may not be possible.The text was updated successfully, but these errors were encountered: