Best practices: Specify file extensions when using require/import in Node.js Get into the habit of using *.mjshttps://twitter.com/nodemjs/status/861841938986795009 …
-
-
Replying to @mathias
Doesn’t the article say to *omit* the file ext. in Node? E.g. import x from 'x'; should work regardless of whether the module is CJS or ESM.
2 replies 0 retweets 0 likes
Replying to @simevidas
My tweet doesn’t echo anything from the article directly. Module specifiers must be URLs for now, so import x from 'x' won’t work
10:33 PM - 9 May 2017
0 replies
0 retweets
1 like
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.