Re: minisphere 4.4.2
Reply #1491 –
Found out something interesting: While Babel does compile ES6 modules to CommonJS, and therefore you can import them using require(), the exports are all named. Which means if you have a module with:
// pig.js
export default
function getEaten() {
console.log("You got eaten by the pig. Good job.");
}
To load that module using require, you'd need to:
const getEaten = require('./pig').default;
Apparently the same will be true in Node once they implement ES6 modules:
https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md