I don't understand what actual concrete benefit there is to using .mjs on client-side JavaScript modules. It seems to only cause problems with tools that .js completely avoids. What's the specific upside?
-
-
It might become possible to use other extensions at the cost of yet-to-be-specified additional configuration.
-
Tools are increasingly adopting .mjs as a signal that the source file is a module instead of a classic script, reducing the need for additional configuration in build systems.
- 4 more replies
New conversation -
-
-
I dunt get this claim. Nearly every maintained client-side package that I see right now is already written as modules. Most have been for years. What's the concrete benefit to developers of changing all the extensions? Some additional clarity there isn't there now?
-
I haven't changed my extensions, but when tooling becomes mature, I definitely will. Most code I write run on both Node and browser. So if Node requires .mjs for modules, I'll have to (I hate the .mjs extension btw). I guess people are doing it now for future proofing.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.