Tag Archives: include

node & javascript ecmascript include import and export

javascript ecmascript include import and export


While import is indeed part of ES6, it is unfortunately not yet supported in NodeJS by default, and has only very recently landed support in browsers.


rename your .JS files to .MJS then run

$ node --experimental-modules my-app.mjs