(March 2, 2018)
ES6 modules are a cool new feature coming with Node.js 10.x, and a pre-release version available is avaible in 9.x. ES6 modules implement most of what we can do with Node.js's traditional CommonJS modules. One feature missing is the ability to dynamically select the module to load. The ES6
import statement only takes a static string. A new feature, landing in Node.js 9.7.x, adds an
import() function offering a new way to load modules.
The most important feature may be that
import() can be used in a CommonJS module to import an ES6 module.