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
I'm not ever going to use or support the .mjs extension in my modules.
5 replies 10 retweets 53 likes -
-
Too much churn to change all the tools when it could be solved without a new extension.
2 replies 1 retweet 7 likes -
Node needs to move forward (with mjs), but I'm hopeful a consensus will emerge to do something better later! "Baby steps"pic.twitter.com/2FdJDaodUV
3 replies 0 retweets 1 like -
.mjs is going to be the Python 3 of Node.js
4 replies 10 retweets 42 likes -
It's going to be io.js :)
1 reply 0 retweets 0 likes -
Replying to @xjamundx @sindresorhus and
is at least *.mjs also supposed to be browser compatible ?
1 reply 0 retweets 0 likes
Browsers don’t care about the extension. type=module or import says enough there
-
-
thanks for clarifying ! I thought you needed both type & extension! Btw are es6 imports still supported in webworkers ?(in spec at some pt)
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.