I've done some testing and this works correctly:
import './middleman';
// './middleman.js'
window.Example = require('./example.js').default
// OR
window.Example = require('./example.js').Example
// './example.js'
export function Example() {
this.name = 'Example'
}
export { Example as default }