src/require.js
function syncRequire(...params) {
  const [userResolver, moduleId] = _parseRequireParams(params);
  if (userResolver.isCoreModule(moduleId)) return getRequire()(moduleId);
  userResolver.basedir = userResolver.basedir || userResolver.dir;
  const filename = resolveModulePathSync(userResolver, moduleId, true);
  return _loadModuleSync(filename, userResolver);
}
function syncRequire(...params) {
  const [userResolver, moduleId] = _parseRequireParams(params);
  if (userResolver.isCoreModule(moduleId)) return getRequire()(moduleId);
  userResolver.basedir = userResolver.basedir || userResolver.dir;
  const filename = resolveModulePathSync(userResolver, moduleId, true);
  return _loadModuleSync(filename, userResolver);
}
function syncRequire ( ... params ) { const [ userResolver , moduleId ] = _parseRequireParams ( params ) ; if ( userResolver . isCoreModule ( moduleId ) ) return getRequire ( ) ( moduleId ) ; userResolver . basedir = userResolver . basedir || userResolver . dir ; const filename = resolveModulePathSync ( userResolver , moduleId , true ) ; return _loadModuleSync ( filename , userResolver ) ; }
CommonJs require function, similar to node.js native version but with extra features of this module.

@param {Resolver} [userResolver]   Resolver to use in requiring.
@param {string} moduleId           Module to load.
@returns {*}                       Module exports
CommonJs require function similar to node . js native version but with extra features of this module .