We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述:esl 环境中,在断网的情况下 require 模块失败,在连网后再次触发 require 该模块 不会触发该模块的加载。
esl
require 模块
require 该模块
通过阅读esl源码,个人认为问题原因为:无论模块加载成功与否,loadingModules[moduleId1] 都会赋值为 1,导致即使后来再次 require([moduleId1]) 也不会进入到新建 script 加载的逻辑。
loadingModules[moduleId1]
require([moduleId1])
script
建议: 在此挂接 onerror 的错误处理,重新赋值 loadingModules[moduleId1] 为 0,使得加载某个模块失败后,还能重新加载该模块。
onerror
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述:
esl
环境中,在断网的情况下require 模块
失败,在连网后再次触发require 该模块
不会触发该模块的加载。通过阅读esl源码,个人认为问题原因为:无论模块加载成功与否,
loadingModules[moduleId1]
都会赋值为 1,导致即使后来再次require([moduleId1])
也不会进入到新建script
加载的逻辑。建议: 在此挂接
onerror
的错误处理,重新赋值loadingModules[moduleId1]
为 0,使得加载某个模块失败后,还能重新加载该模块。The text was updated successfully, but these errors were encountered: