Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been doing nodejs backend development for the past 10 years and I have no idea why ES module are needed and who is using them. I assume this is a front end thing.

We are using typescript which is using "import" syntax, but as far as I know, it's still transpiling to good old "require".



> I have been doing nodejs backend development for the past 10 years and I have no idea why ES module are needed and who is using them

ES modules are part of the Ecmascript spec. DENO uses them. Node.js modules aren't part of the ES spec.


I see, so a front end thing indeed :) (and yes deno, which I feel the main purpose is to bring the problems and debates of the front end devs, in an otherwise much saner js backend end world ^^ )


You can tell TS to output ESM. Try using top-level await with TS and you'll run into that. The configuration options are vast.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: