Hacker News new | past | comments | ask | show | jobs | submit login

Honest question: Does anybody actually care that it doesn't?



It matters. Projects that don't support IE ≤11 could ship ES Modules to the browser today. However, you can't ship most code that's written as "es modules" because this code is typically written for a transpiler rather than a real runtime modules environment.

Some of this is a limitation in browsers, like support for bare module specifiers. That is, you should be able to write code like `import {foldl} from 'lodash';`. Work is underway to support this in the browser without requiring multiple round trips to the server to guess where 'lodash' should be loaded from: https://github.com/domenic/import-maps


I don't think its as much a matter of people caring or not as it is that node is implementing ecma262 esm, not babel esm or typescript esm, etc.


What happens if people seem to prefer the babel-esm semantics? I'm not saying that babel's semantics ARE better, but what if developers prefer them?


then they can continue using them, and not use the real esm semantics? i don't think anything would change for them.




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

Search: