4 ms·
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 m
by BluSyn 4y ago
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.
- afiori 4y agoIt 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-as-default/ https://jakearchibald.com/2021/export-default-thing-vs-thing...
- b0afc375b5 4y agoI read halfway through before my brain shutoff. I keep asking myself if all this complexity is necessary.
- afiori 4y agoIt 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.