Is there any one-line analogy in ES6 for ES5 `module.exports = require(‘./inner.js’)`?

You should be able to do

export {default as default} from './inner.js';
// or even
export {default} from './inner.js';

with current ES6 semantics.

However I don’t think there’s anything wrong with using the ES next proposal, I’m pretty confident that it will make it into ES7 ES8.

Leave a Comment