267046 (2) [Avatar] Offline
#1
This is regarding the example shown in video: https://livevideo.manning.com/module/21_2_1/nodejs-in-motion/node-on-the-command-line/input-and-output-with-node

Since this course is using ES6, Could we import readline library rather than require it?
If we do, does this mean we need to transpile the code to ES5?
I see we are already using other ES6 features (without transpiling).
Wondering if we could replace require with import.
PJ Evans (4) [Avatar] Offline
#2
As I understand it, support for 'import' will be with us in 2018. Node 8 still uses CommonJS modules rather than ES6. There still seems to be some debate over implementation.
267046 (2) [Avatar] Offline
#3
Thanks for clarifying.