4 ms·
My understanding was that Node didn't support native ES6, is that no longer the case? Or are you talking about using a transpiler?
by grepthisab 10y ago
My understanding was that Node didn't support native ES6, is that no longer the case? Or are you talking about using a transpiler?
- Klathmon 10y agoNode 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.
- quarterto 10y agoNode has supported all of ES6 except modules since 6.0.
- grepthisab 10y agoAh, 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!
- lojack 10y agoA 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 10y agoYou can always check here: http://node.green http://node.green
- wereHamster 10y agoI don't see ES6 modules (import/export keywords etc) in that list. Where is that feature hiding?
- charrondev 10y agoThe 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 10y agoBut the syntax is in es2015. So that feature should be marked as NO in those tables.