add option check for es6modules and moved es6modules after arrow function