Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
grepthisab
· 9y ago · 0 comments
My understanding was that Node didn't support native ES6, is that no longer the case? Or are you talking about using a transpiler?
Comments
[–]
quarterto
9y ago
Node has supported all of ES6 except modules since 6.0.
[–]
grepthisab
OP
9y ago
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!
[–]
Klathmon
9y ago
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.
[–]
lojack
9y ago
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.
[–]
MehdiHK
9y ago
You can always check here:
http://node.green
[–]
wereHamster
9y ago
I don't see ES6 modules (import/export keywords etc) in that list. Where is that feature hiding?
[–]
charrondev
9y ago
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.
[–]
wereHamster
9y ago
But the syntax is in es2015. So that feature should be marked as NO in those tables.