scripts/rewrite-modules.js
function mapModule(state, module) {
  var moduleMap = state.opts.map || {};
  if (moduleMap.hasOwnProperty(module)) {
    return moduleMap[module];
  }
  // Jest understands the haste module system, so leave modules intact.
  if (process.env.NODE_ENV === 'test') {
    return;
  }
  return './' + path.basename(module);
}
function mapModule(state, module) {
  var moduleMap = state.opts.map || {};
  if (moduleMap.hasOwnProperty(module)) {
    return moduleMap[module];
  }
  // Jest understands the haste module system, so leave modules intact.
  if (process.env.NODE_ENV === 'test') {
    return;
  }
  return './' + path.basename(module);
}
function mapModule ( state , module ) { var moduleMap = state . opts . map || { } ; if ( moduleMap . hasOwnProperty ( module ) ) { return moduleMap [ module ] ; } // Jest understands the haste module system, so leave modules intact. if ( process . env . NODE_ENV === 'test' ) { return ; } return './' + path . basename ( module ) ; }
This file is a fork from fbjs's transform of the same name. It has been
modified to also apply to import statements, and to account for relative
file names in require statements.
 
Rewrites module string literals according to the `map` and `prefix` options.
This allows other npm packages to be published and used directly without
being a part of the same build.
This file is a fork from fbjs s transform of the same name . It has been modified to also apply to import statements and to account for relative file names in require statements . Rewrites module string literals according to the map and prefix options . This allows other npm packages to be published and used directly without being a part of the same build .