@lark-apaas/fullstack-rspack-preset 1.0.26-alpha.3 → 1.0.26-alpha.4
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.
|
@@ -96,19 +96,14 @@ function getSlardarScriptContent(option = {}) {
|
|
|
96
96
|
const bid = option.bid || 'apaas_ai';
|
|
97
97
|
const globalName = option.globalName || 'KSlardarWeb';
|
|
98
98
|
return [
|
|
99
|
-
{
|
|
100
|
-
tagName: 'script',
|
|
101
|
-
voidTag: false,
|
|
102
|
-
attributes: {
|
|
103
|
-
src: `https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js?bid=${bid}&globalName=${globalName}`,
|
|
104
|
-
crossOrigin: 'anonymous',
|
|
105
|
-
defer: true,
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
99
|
{
|
|
109
100
|
tagName: 'script',
|
|
110
101
|
voidTag: false,
|
|
111
102
|
innerHTML: `
|
|
103
|
+
const slardarScript = document.createElement('script');
|
|
104
|
+
slardarScript.src = 'https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js?bid=${bid}&globalName=${globalName}';
|
|
105
|
+
slardarScript.crossOrigin = 'anonymous';
|
|
106
|
+
|
|
112
107
|
// 添加 onload 事件处理
|
|
113
108
|
slardarScript.onload = function() {
|
|
114
109
|
// 脚本加载完成后执行初始化
|
|
@@ -126,6 +121,9 @@ function getSlardarScriptContent(option = {}) {
|
|
|
126
121
|
slardarScript.onerror = function() {
|
|
127
122
|
console.warn('Failed to load Slardar script');
|
|
128
123
|
};
|
|
124
|
+
|
|
125
|
+
// 将脚本添加到页面
|
|
126
|
+
document.head.appendChild(slardarScript);
|
|
129
127
|
`,
|
|
130
128
|
attributes: {},
|
|
131
129
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/fullstack-rspack-preset",
|
|
3
|
-
"version": "1.0.26-alpha.
|
|
3
|
+
"version": "1.0.26-alpha.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"patches",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@lark-apaas/miaoda-inspector-babel-plugin": "^1.0.0",
|
|
36
36
|
"@lark-apaas/miaoda-inspector-jsx-runtime": "^1.0.0",
|
|
37
37
|
"@rspack/plugin-react-refresh": "^1.5.1",
|
|
38
|
-
"@swc/plugin-styled-jsx": "
|
|
38
|
+
"@swc/plugin-styled-jsx": "11.0.0",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"colorjs.io": "^0.5.2",
|
|
41
41
|
"dotenv": "^16.4.5",
|