-
Notifications
You must be signed in to change notification settings - Fork 38
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
estrella doesn't seem to be working within ESM context #51
Comments
I'm experiencing the second issue, too. The solution to 1. is listed in the error message - if I destructure the estrella import I can repro your issue, but it works fine for me like:
|
I wonder if this is due to "Breaking API change to WatchCallback" in https://github.com/rsms/estrella/releases/tag/v1.4.0? Downgrading estrella to 1.3.x resolves my issue 👍 Context / repro: I'm playing with https://github.com/sunderjs/sunder-worker-template (see build.js, and I recklessly upgraded all deps 😆 |
I'm experiencing the second issue ( I need 1.4.x because I'm building a browser JS bundle and without the (@ptim ironically, I was using the same template for my use case) |
I proposed a fix via #53. it works locally for me and all tests pass. |
This issue is still relevant. |
Any chance to accept the PR? |
As more and more dependencies are updating to ESM, I've figured it's time to bite the bullet and make my project ESM-ready as well.
But adding
"type": "module"
to my project's package.json leads to these two issues when runningnode build.js
:the proposed workaround works though.
TypeError: Cannot read properties of undefined (reading 'filename')
this is due to this code:
estrella/src/util.js
Line 27 in e5b985b
process.mainModule
does not seem to exist in ESM.The text was updated successfully, but these errors were encountered: