Issue #752
Use esm
npm install esm
In our code, import as normal
const fs = require('fs');
// intended to be run after babel, and in ./dist folder
import factory from 'data'
const shell = require('shelljs')
Then use esm
to convert
{
"name": "generator",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "npx babel index.js --out-file dist/index.js && node -r esm dist/index.js"
}
}