static loadBundleForModule_(moduleId, resolver) {
    const bundle = mr.Module.getBundle_(moduleId);
    if (!bundle) {
      resolver.reject(new Error(`No corresponding bundle for ${moduleId}`));
      return;
    }

    if (mr.Module.DEFAULT_LOAD_BUNDLES_.has(bundle)) {
      return;
    }

    // Check if the bundle has been not requested previously.
    let bundlePromise = mr.Module.bundlePromises_.get(bundle);
    if (!bundlePromise) {

      mr.Module.logger_.info(`Loading bundle ${bundle} for module ${moduleId}`);
      bundlePromise = mr.Module.doLoadBundle_(bundle);
      mr.Module.bundlePromises_.set(bundle, bundlePromise);
    }

    // Add an error handler to reject the module load request.
    bundlePromise.catch(e => {
      resolver.reject(e);
    });
  }
/**
   * Loads the bundle corresponding to the given module. Called the first time
   * a module is requested.
   * @param {mr.ModuleId} moduleId
   * @param {!mr.PromiseResolver<!mr.Module>} resolver Rejected if the bundle
   *     associated with the module won't be loaded due to permanent error.
   * @private
   */
Loads the bundle corresponding to the given module. Called the first time
a module is requested.
@param {mr.ModuleId} moduleId
@param {!mr.PromiseResolver} resolver Rejected if the bundle
associated with the module won't be loaded due to permanent error.
@private
Loads the bundle corresponding to the given module . Called the first time a module is requested . @param { mr . ModuleId } moduleId @param { !mr . PromiseResolver } resolver Rejected if the bundle associated with the module won ' t be loaded due to permanent error . @private
static loadBundleForModule_(moduleId, resolver) {
    const bundle = mr.Module.getBundle_(moduleId);
    if (!bundle) {
      resolver.reject(new Error(`No corresponding bundle for ${moduleId}`));
      return;
    }
    if (mr.Module.DEFAULT_LOAD_BUNDLES_.has(bundle)) {
      return;
    }
    let bundlePromise = mr.Module.bundlePromises_.get(bundle);
    if (!bundlePromise) {
      mr.Module.logger_.info(`Loading bundle ${bundle} for module ${moduleId}`);
      bundlePromise = mr.Module.doLoadBundle_(bundle);
      mr.Module.bundlePromises_.set(bundle, bundlePromise);
    }
    bundlePromise.catch(e => {
      resolver.reject(e);
    });
  }
static loadBundleForModule_ ( moduleId , resolver ) { const bundle = mr . Module . getBundle_ ( moduleId ) ; if ( ! bundle ) { resolver . reject ( new Error ( ` ${ moduleId } ` ) ) ; return ; } if ( mr . Module . DEFAULT_LOAD_BUNDLES_ . has ( bundle ) ) { return ; } let bundlePromise = mr . Module . bundlePromises_ . get ( bundle ) ; if ( ! bundlePromise ) { mr . Module . logger_ . info ( ` ${ bundle } ${ moduleId } ` ) ; bundlePromise = mr . Module . doLoadBundle_ ( bundle ) ; mr . Module . bundlePromises_ . set ( bundle , bundlePromise ) ; } bundlePromise . catch ( e => { resolver . reject ( e ) ; } ) ; }
Loads the bundle corresponding to the given module.
Loads the bundle corresponding to the given module .
// Check if the bundle has been not requested previously. // Add an error handler to reject the module load request.