-
Notifications
You must be signed in to change notification settings - Fork 69
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
Doesn't work with esm ? #99
Comments
I kind of made it work. But do I understand why ? no ... There is something I don't understand about ES6 - esm. It kind of looks like, I've change everything to use import instead of request, but unfortunately it doesn't work at all. what a shame. |
If I recall correctly, when you use However, when you use |
Workaround via https://stackoverflow.com/questions/53200528/esm-does-not-resolve-module-alias
|
@malammar really cool, thank you ! Do you want to submit a PR to update the README with your solution ? |
Is there a way to use |
So, how do I use module along with module-alias? It works perfectly when I don't use |
You can use this module instead |
I found a way to make nodemon work, typescript with module_alias. Your package.json should look like this:
After that, every update in the TS code will be recompiled by the nodemon using the custom paths. |
I just wanted to use it with my nodejs 14x app.
I run my node with esm module for ES6 support.
and packages.json
And I keep getting error
Cannot find module '_root/logger'
Tried with different combinations of directories and names always same result.
Is it because I run my app with
node -r esm -r dotenv/config server.js
esm ?The text was updated successfully, but these errors were encountered: