/* eslint-disable no-undef */

const h5TafLoader = require('../../../utils/h5TafLoader');

let _ready = false;
module.exports = async function () {
  if (!_ready) {
    await h5TafLoader();
    require('../jce/ExtComm');
    require('../jce/ExtRouteUI');
    require('../jce/ExtCapabilityUI');
    require('../jce/DevMessageServant');
    _ready = true;
  }

  return {
    Taf: window.Taf,
    HUYA: window.HUYA,
    DEV: window.DEV,
    ExtComm: window.ExtComm
  };
};
