The state of JavaScript modules
That was the best high-level overview of the struggles of the Node core team dealing with modules I've read yet. Unfortunately we're all stuck with transpiling and bundles for at least 5+ years because of browser support, but at least that gives them time to sort this out. Cheers to hoping that .mjs doesn't win the battle...
More on reddit.com[shower thoughts] Why are JavaScript modules treated as objects instead of functions?
Understanding JS modules
Common JS vs ES Modules and why?
Is a module just a JavaScript library?
Everything seems so mysterious about them. Every tutorial talks about theyre history and ES history and what not. Talks about systems for handling modules, but never about what a module is.
They say a module allows a JavaScript code to be accessed, but every code in every file is always accessible, every mp3 file is accessible and playable, every C file is accessible, compilable, readable ... (Unlees its got root privilege restrictions)