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

I use JS/TS every day. I tried to understand the intricacies in module/import issues. Just reading about it gave me a headache, and tempted me to just rewrite my entire project in Rust.

I'm still tempted some days.

It's beyond painful. It's infuriating.




It is not going to convince you that ESM modules are well designed... but this post explain a lot of the intricacies

https://jakearchibald.com/2021/export-default-thing-vs-thing...


I read halfway through before my brain shutoff. I keep asking myself if all this complexity is necessary.


It is a shame because the whole "import namespaces from URLs" is a nice idea.

In my opinion they should have dropped the whole "live reference imports" which is a completely new concept to the language.

Personally I would have liked inline modules definitions à la Rust.




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

Search: