Migration from require.js to es6-modules