@kimesh/router-generator 0.2.37 → 0.2.38
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/index.mjs +4 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1203,7 +1203,10 @@ function getRelativePath(route) {
|
|
|
1203
1203
|
const routePath = route.routePath;
|
|
1204
1204
|
if (parentPath === "/") return routePath === "/" ? "" : stripLeadingSlash(routePath);
|
|
1205
1205
|
let relativePath = routePath;
|
|
1206
|
-
if (relativePath.startsWith(parentPath))
|
|
1206
|
+
if (parentPath && relativePath.startsWith(parentPath)) {
|
|
1207
|
+
const afterPrefix = relativePath[parentPath.length];
|
|
1208
|
+
if (afterPrefix === "/" || afterPrefix === void 0) relativePath = relativePath.slice(parentPath.length);
|
|
1209
|
+
}
|
|
1207
1210
|
relativePath = stripLeadingSlash(relativePath);
|
|
1208
1211
|
return !relativePath && route.type === "index" ? "" : relativePath;
|
|
1209
1212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/router-generator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38",
|
|
4
4
|
"description": "File-based route generator for Kimesh",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:watch": "vitest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kimesh/shared": "0.2.
|
|
29
|
+
"@kimesh/shared": "0.2.38",
|
|
30
30
|
"@vue/compiler-sfc": "^3.5.26",
|
|
31
31
|
"chokidar": "^5.0.0",
|
|
32
32
|
"consola": "^3.4.2",
|