We can enable importing named exports for non-ES6 modules like:
import { readFile } from 'fs';
To do this means making the module object look like:
var mObj = { default: require('fs') };
// extend with named properties before defining the module
extend(mObj, mObj.default);
return System.newModule(mObj);
This is effectively what 6to5 does. It's just a one way road we should go down carefully...
We can enable importing named exports for non-ES6 modules like:
To do this means making the module object look like:
This is effectively what 6to5 does. It's just a one way road we should go down carefully...