@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.
- package/dist/collect-source.js +2 -6
- package/dist/collect-source.js.map +1 -1
- package/dist/index.esm.js +2 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -935,13 +935,9 @@ async function execAppScripts(app) {
|
|
|
935
935
|
}
|
|
936
936
|
const appScriptList = Array.from(app.source.scripts.values()).filter(script => script.fromHtml && !script.initial);
|
|
937
937
|
const commomList = appScriptList.filter(script => (!script.async && !script.defer) || script.isModule);
|
|
938
|
-
let i = 0;
|
|
939
|
-
while (i < commomList.length && commomList[i]) {
|
|
940
|
-
await commomList[i].excuteCode(app);
|
|
941
|
-
i++;
|
|
942
|
-
}
|
|
943
938
|
// 保证同步脚本 和 module类型 最先执行
|
|
944
|
-
|
|
939
|
+
await Promise.all(commomList.map(script => script.getCode(app)));
|
|
940
|
+
await Promise.all(commomList.map(script => script.excuteCode(app)));
|
|
945
941
|
// 最后执行 defer 和 async 脚本
|
|
946
942
|
const deferScriptList = [];
|
|
947
943
|
const asyncScriptList = [];
|