MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/bgiky2/introducing_nodejs_12/elle5ch/?context=3
r/javascript • u/vzhou842 • Apr 23 '19
85 comments sorted by
View all comments
91
ES6 Module Support!
47 u/jsnoobie Apr 23 '19 No more red squiggly line in vscode under the βreβ on my require statements!I was a little ocd about that one 23 u/tanguy_k Apr 23 '19 edited Apr 23 '19 It's still behind a flag (--experimental-modules) + you need to add "type": "module" inside your package.json.See https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff 17 u/[deleted] Apr 23 '19 Yes, but they expect to remove the need for the flag during the development of this version (before it goes LTS in October). 8 u/ShortFuse Apr 24 '19 Do I still need to use Michael Jackson Script file extension?I've been using the esm package, but I would like to be able to remove the dependency? 3 u/[deleted] Apr 24 '19 You don't. If you add "type": "module" to your package.json, plain .js will work too. 7 u/k4kshi Apr 23 '19 Still not the end goal but we're getting closer 3 u/Baryn Apr 24 '19 Screw MJS! π
47
No more red squiggly line in vscode under the βreβ on my require statements!
I was a little ocd about that one
23
It's still behind a flag (--experimental-modules) + you need to add "type": "module" inside your package.json.
--experimental-modules
"type": "module"
See https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff
17 u/[deleted] Apr 23 '19 Yes, but they expect to remove the need for the flag during the development of this version (before it goes LTS in October).
17
Yes, but they expect to remove the need for the flag during the development of this version (before it goes LTS in October).
8
Do I still need to use Michael Jackson Script file extension?
I've been using the esm package, but I would like to be able to remove the dependency?
esm
3 u/[deleted] Apr 24 '19 You don't. If you add "type": "module" to your package.json, plain .js will work too.
3
You don't. If you add "type": "module" to your package.json, plain .js will work too.
7
Still not the end goal but we're getting closer
Screw MJS! π
91
u/[deleted] Apr 23 '19
ES6 Module Support!