Re:Node v7.5.0 Released
by grepthisab on Friday February 03, 2017 @07:18AM
(#13559264)
My understanding was that Node didn't support native ES6, is that no longer the case? Or are you talking about using a transpiler?
[ Parent
| on HN ]
Node has supported all of ES6 except modules since 6.0.
Re:Node v7.5.0 Released
by grepthisab on Friday February 03, 2017 @08:39AM
(#13559679)
Ah, this explains it. I tried to use an import statement a couple days ago and it failed, so I assumed it still wasn't supporting ES6. Good to know!
Node supports all of ES2015 and ES2016 and will soon support ES2017 in the next few months or so.
So yeah, for most things you don't need to use a transpiler.
A year or two ago that was the case. Then io.js forked, implemented a bunch of features and later was brought back into the NodeJS fold. Since then, Node has been a lot more proactive about keeping up with newer specs.
You can always check here: http://node.green
Re:Node v7.5.0 Released
by wereHamster on Friday February 03, 2017 @03:01PM
(#13562774)
I don't see ES6 modules (import/export keywords etc) in that list. Where is that feature hiding?
Re:Node v7.5.0 Released
by charrondev on Saturday February 04, 2017 @02:36PM
(#13568588)
The loader spec hasn't been completed yet so there is no way to load properly modules in es2015, es2016, or es2017 as far as I know.
Re:Node v7.5.0 Released
by wereHamster on Sunday February 05, 2017 @11:44AM
(#13573154)
But the syntax is in es2015. So that feature should be marked as NO in those tables.