Best practices: Specify file extensions when using require/import in Node.js Get into the habit of using *.mjshttps://twitter.com/nodemjs/status/861841938986795009 …
-
-
Wouldn't require-means-js, import-means-module be enough of a hint. Then you just need a cmd flag for the top level.
-
That's what I and others suggested, but apparently not everyone likes idea that devs need to know what type of module they're importing.
- 3 more replies
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.