Can I use ES6 module syntax with Node.js starting from version 8? Similar questions have already been asked on this site, but answers there are obsolete. I wonder if the situation has changed with new version of Node.js?
Asked
Active
Viewed 1.6k times
14
-
1Still a work in progress I think, but [this might be worth keeping an eye on](https://github.com/standard-things/esm) - "This small (< 40 kB), zero dependency, package is all you need to enable ECMAScript modules in Node 4+ today!". From the fella that brought you lodash. – Andy Jul 28 '17 at 18:17
-
**Yes!** u can..using Babel. – ɢʀᴜɴᴛ Nov 20 '17 at 14:57
-
It's possible as of today, see simple example here: https://stackoverflow.com/questions/45854169/how-can-i-use-an-es6-import-in-node/50641589#50641589 – Manohar Reddy Poreddy Jun 01 '18 at 10:44
1 Answers
11
https://medium.com/the-node-js-collection/an-update-on-es6-modules-in-node-js-42c958b890c
It is in progress but the ETA is 2018 at the earliest.

AnilRedshift
- 7,937
- 7
- 35
- 59