@lark-apaas/fullstack-rspack-preset 1.0.26-alpha.4 → 1.0.26-alpha.5
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.
|
@@ -71,16 +71,11 @@ class SlardarPerformanceMonitorPlugin {
|
|
|
71
71
|
tag.attributes.src.includes('main.js'));
|
|
72
72
|
if (mainJsIndex !== -1) {
|
|
73
73
|
// 在 main.js 之前插入 Slardar 脚本
|
|
74
|
-
data.headTags
|
|
75
|
-
...data.headTags.slice(0, mainJsIndex),
|
|
76
|
-
...slardarTags,
|
|
77
|
-
...data.headTags.slice(mainJsIndex),
|
|
78
|
-
];
|
|
74
|
+
data.headTags.splice(mainJsIndex, 0, ...slardarTags, teaTag);
|
|
79
75
|
}
|
|
80
76
|
else {
|
|
81
77
|
// 如果没找到 main.js,插入到 headTags 最前面
|
|
82
|
-
data.headTags
|
|
83
|
-
data.headTags.unshift(teaTag);
|
|
78
|
+
data.headTags.unshift(...slardarTags, teaTag);
|
|
84
79
|
}
|
|
85
80
|
return data;
|
|
86
81
|
});
|