3 ms·
I can for my life not understand why the standards committee did not make the NodeJS module system the standard, what where they thinking !?
by z3t4 9y ago
I can for my life not understand why the standards committee did not make the NodeJS module system the standard, what where they thinking !?
- egeozcan 9y agoIIRC there were some technical challenges to implement the same structure on the client side. Also, they wanted to make imports declarative.
- krzkaczor 9y agoIt's possible to statically analyze ESM — it's not so simple with nodejs modules.
- k__ 9y agoBecause it's synchronous.
- nycdotnet 9y agoAlso the use case in Node of loading files from local disk is very different than the use case of loading scripts over HTTP in the browser.
- ricardobeat 9y agoOnly this year the syntax for importing modules at runtime has been worked out. Current behaviour is exactly the same as commonjs and only useful for static analysis, 7 years later.