@lark-apaas/fullstack-rspack-preset 1.0.50-alpha.5 → 1.0.50-alpha.7
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/lib/preset.js
CHANGED
|
@@ -377,6 +377,12 @@ function createRecommendRspackConfig(options) {
|
|
|
377
377
|
changeOrigin: true,
|
|
378
378
|
onError: sendBackendUnavailable502,
|
|
379
379
|
},
|
|
380
|
+
{
|
|
381
|
+
context: [`${clientBasePath}/openapi`],
|
|
382
|
+
target: `http://localhost:${serverPort}`,
|
|
383
|
+
changeOrigin: true,
|
|
384
|
+
onError: sendBackendUnavailable502,
|
|
385
|
+
},
|
|
380
386
|
{
|
|
381
387
|
context: [`${clientBasePath}/__innerapi__`],
|
|
382
388
|
target: `http://localhost:${serverPort}`,
|
|
@@ -90,19 +90,10 @@ class SlardarPerformanceMonitorPlugin {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
exports.default = SlardarPerformanceMonitorPlugin;
|
|
93
|
-
function getEarlyResourceErrorTag(globalName) {
|
|
94
|
-
return {
|
|
95
|
-
tagName: 'script',
|
|
96
|
-
voidTag: false,
|
|
97
|
-
innerHTML: `(function(g){if(!window[g]){var q=[];window[g]=function(){q.push([].slice.call(arguments));};window[g].q=q;}window.addEventListener('error',function(e){if(e.error!=null||!(e.target instanceof Element))return;var t=e.target,url=t.src||t.href||'';if(!url)return;window[g]('captureException',new Error('Resource load failed: '+url),{team:'miaoda-sdk',source:'resource-error',resourceType:t.tagName.toLowerCase(),resourceUrl:url});},true);})('${globalName}');`,
|
|
98
|
-
attributes: {},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
93
|
function getSlardarScriptContent(option = {}) {
|
|
102
94
|
const bid = option.bid || 'apaas_miaoda';
|
|
103
95
|
const globalName = option.globalName || 'KSlardarWeb';
|
|
104
96
|
return [
|
|
105
|
-
getEarlyResourceErrorTag(globalName),
|
|
106
97
|
{
|
|
107
98
|
tagName: 'script',
|
|
108
99
|
voidTag: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/fullstack-rspack-preset",
|
|
3
|
-
"version": "1.0.50-alpha.
|
|
3
|
+
"version": "1.0.50-alpha.7",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"patches",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/parser": "^7.28.0",
|
|
32
32
|
"@babel/traverse": "^7.28.0",
|
|
33
33
|
"@babel/types": "^7.28.2",
|
|
34
|
-
"@lark-apaas/devtool-kits": "
|
|
34
|
+
"@lark-apaas/devtool-kits": "1.2.17-alpha.54",
|
|
35
35
|
"@lark-apaas/miaoda-inspector-babel-plugin": "^1.0.2",
|
|
36
36
|
"@lark-apaas/styled-jsx": "^1.0.1",
|
|
37
37
|
"@rspack/plugin-react-refresh": "^1.5.1",
|