@blueking/bk-weweb 0.0.2-5.beta.2 → 0.0.2-5.beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1188,13 +1188,9 @@ async function execAppScripts(app) {
1188
1188
  }
1189
1189
  const appScriptList = Array.from(app.source.scripts.values()).filter(script => script.fromHtml && !script.initial);
1190
1190
  const commomList = appScriptList.filter(script => (!script.async && !script.defer) || script.isModule);
1191
- let i = 0;
1192
- while (i < commomList.length && commomList[i]) {
1193
- await commomList[i].excuteCode(app);
1194
- i++;
1195
- }
1196
1191
  // 保证同步脚本 和 module类型 最先执行
1197
- // await Promise.all(commomList.map(script => script.excuteCode(app)));
1192
+ await Promise.all(commomList.map(script => script.getCode(app)));
1193
+ await Promise.all(commomList.map(script => script.excuteCode(app)));
1198
1194
  // 最后执行 defer 和 async 脚本
1199
1195
  const deferScriptList = [];
1200
1196
  const asyncScriptList = [];