let moduleMap = { // tail }; window.__cocos_require__ = function (moduleName) { let func = moduleMap[moduleName]; if (!func) { throw new Error(`cannot find module ${moduleName}`); } return func(); };