Revert "debugging add module support"

This reverts commit 85da528de5e258a765b842ca5e55c4cf81fd2936.
This commit is contained in:
pengfei.zhou
2021-08-24 16:11:04 +08:00
committed by osborn
parent 7516cef93e
commit 059f27c743
7 changed files with 4 additions and 65 deletions

View File

@@ -54,18 +54,6 @@ function initNativeEnvironment(source) {
const msg = JSON.parse(data);
const payload = msg.payload;
switch (msg.cmd) {
case "":
const { name, content } = payload;
Reflect.apply(doric.jsRegisterModule, undefined, [
name,
Reflect.apply((function (__module) {
eval(`(function (module, exports, require) {
${content}
})(__module, __module.exports, doric.__require__)`);
return __module.exports;
}), undefined, [{ exports: {} }])
]);
break;
case "DEBUG_RES":
const contextId = msg.payload.contextId;
resolve(contextId);