How do I perform an export that is compatible with ES5 and ES6?
As far as writing an export that is compatible for both ES5 and ES6, Babel already takes care of that for you. (As communicated in the comments to your question. I’m only clarifying for those who got lost in the dialog.) module.exports = MyClass will work with both var MyClass = require(‘mymodule’) and import MyClass … Read more