'use strict' ; async function requirePromise ( pkg ) { return new Promise ( ( resolve , reject ) => { console . log ( 'require promise' ) ; const requirejsfunc = ( requirejs as any ) || ( window as any ) . requirejs ; if ( requirejsfunc === undefined ) { reject ( 'Requirejs is needed, please ensure it is loaded on the page.' ) ; } else { requirejsfunc ( pkg , resolve , reject ) ; } } ) ; } export function requireLoader ( moduleName ) { return requirePromise ( [ `${ moduleName }` ] ) ; }