@olenbetong/appframe-vite 4.0.0-rc.1 → 4.0.0
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/devServer.js +5 -0
- package/package.json +2 -2
package/lib/devServer.js
CHANGED
|
@@ -88,6 +88,11 @@ async function getArticleHtml() {
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
nodesToRemove.forEach((node) => node.remove());
|
|
91
|
+
dom.window.document.querySelectorAll("a").forEach((anchor) => {
|
|
92
|
+
if (anchor.href?.startsWith("/") && !anchor.href?.startsWith(`/${article}`)) {
|
|
93
|
+
anchor.href = `https://${hostname}${anchor.href}`;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
91
96
|
return dom.serialize();
|
|
92
97
|
}
|
|
93
98
|
throw Error(`Failed to get article '${article}' from '${hostname}': ${response.status} ${response.statusText}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/appframe-vite",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Tools to use and deploy Vite applications to Appframe",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"open": "^9.1.0",
|
|
44
44
|
"tcp-port-used": "^1.0.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d4c8d2d9010a49c9052947bbf7593c6bd13af9b4"
|
|
47
47
|
}
|