Explain to me please, how to maintain compatibility with modules common.js? I wrote a module in the syntax es2015 , in it:
export default data => {}
Beibel transported and published in npm. If you work with the module in the syntax es2015, then it is imported:
import name from 'name'
And if common.js, then it is the only way:
const name = require('name').default
How to make it connect with common.js without .default