code: function normalize( id, baseId ) {
          if ( !id ) {
              return '';
          }
  
          baseId = baseId || '';
          var idInfo = parseId( id );
          if ( !idInfo ) {
              return id;
          }
  
          var resourceId = idInfo.resource;
          var moduleId = relative2absolute( idInfo.module, baseId );
  
          each(
              packagesIndex,
              function ( packageConf ) {
                  var name = packageConf.name;
                  if ( name === moduleId ) {
                      moduleId = name + '/' + packageConf.main;
                      return false;
                  }
              }
          );
  
          // 根据config中的map配置进行module id mapping
          each(
              mappingIdIndex,
              function ( item ) {
                  if ( item.reg.test( baseId ) ) {
  
                      each( item.v, function ( mapData ) {
                          var key = mapData.k;
                          var rule = createPrefixRegexp( key );
  
                          if ( rule.test( moduleId ) ) {
                              moduleId = moduleId.replace( key, mapData.v );
                              return false;
                          }
                      } );
  
                      return false;
                  }
              }
          );
  
          if ( resourceId ) {
              var module = modGetModuleExports( moduleId );
              resourceId = module.normalize
                  ? module.normalize(
                      resourceId,
                      function ( resId ) {
                          return normalize( resId, baseId );
                      }
                    )
                  : normalize( resourceId, baseId );
  
              moduleId += '!' + resourceId;
          }
  
          return moduleId;
      }
docs: id normalize化
  
  @ignore
  @param {string} id 需要normalize的模块标识
  @param {string} baseId 当前环境的模块标识
  @return {string}