src/require.js
async function _loadModuleSyncAsync(filename, userResolver) {
  const localRequire = requireLike(_getResolve(userResolver).parent || settings.get('parent').filename);
  await promisify(setImmediate)();
  return localRequire(filename);
}
async function _loadModuleSyncAsync(filename, userResolver) {
  const localRequire = requireLike(_getResolve(userResolver).parent || settings.get('parent').filename);
  await promisify(setImmediate)();
  return localRequire(filename);
}
async function _loadModuleSyncAsync ( filename , userResolver ) { const localRequire = requireLike ( _getResolve ( userResolver ) . parent || settings . get ( 'parent' ) . filename ) ; await promisify ( setImmediate ) ( ) ; return localRequire ( filename ) ; }
This is a sychronous version of loadModule.  The module is still resolved
using async methods but the actual loading is done using the native require
from node.

Load and evaluate a module returning undefined to promise resolve
on failure.

@private
@param {string} filename                 The path of the evaluated module.
@param {Resolver|Object} [userResolver]    Resolver to use, if not a resolver assume it is config for a new resolver.
@returns {*}
This is a sychronous version of loadModule . The module is still resolved using async methods but the actual loading is done using the native require from node .