Closed Halliwood closed 1 year ago
Exception: Maximum call stack size exceeded at Puerts.JsEnv.ExecuteModule (System.String filename) [0x00000] in <00000000000000000000000000000000>:0
对于比较复杂的import关系,比如A import B, B import C, C import A...,就可能出现requrie死循环,如下图
tsconfig.target: es2016 tsconfig.module: CommonJS
略
如上图,我把Javascripts~/PuertsDLLMork/index.ts改了一下,暂时解决了这个问题
PUERTS_JS_RESOURCES[specifier](result.exports, (specifierTo: string)=> { return mockRequire(normalize(specifier, specifierTo)); }, result) executeModuleCache[specifier] = result.exports;
改成
executeModuleCache[specifier] = result.exports; PUERTS_JS_RESOURCES[specifier](result.exports, (specifierTo: string)=> { return mockRequire(normalize(specifier, specifierTo)); }, result)
error log | 日志或报错信息
Exception: Maximum call stack size exceeded at Puerts.JsEnv.ExecuteModule (System.String filename) [0x00000] in <00000000000000000000000000000000>:0
context | 编译/运行环境
对于比较复杂的import关系,比如A import B, B import C, C import A...,就可能出现requrie死循环,如下图
tsconfig.target: es2016 tsconfig.module: CommonJS
how to reproduce | 复现步骤
略
more | 其他
如上图,我把Javascripts~/PuertsDLLMork/index.ts改了一下,暂时解决了这个问题
改成