@uniweb/build 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "optionalDependencies": {
53
53
  "@uniweb/content-reader": "1.0.4",
54
- "@uniweb/runtime": "0.2.20"
54
+ "@uniweb/runtime": "0.3.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -60,7 +60,7 @@
60
60
  "@tailwindcss/vite": "^4.0.0",
61
61
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
62
62
  "vite-plugin-svgr": "^4.0.0",
63
- "@uniweb/core": "0.2.0"
63
+ "@uniweb/core": "0.2.1"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "vite": {
@@ -668,7 +668,12 @@ async function collectPagesRecursive(dirPath, parentRoute, siteRoot, orderConfig
668
668
 
669
669
  // For latest version, use parent route directly
670
670
  // For other versions, add version prefix to route
671
- const versionRoute = isLatest ? parentRoute : `${parentRoute}/${entry}`
671
+ // Handle root scope specially to avoid double slash (//v1 → /v1)
672
+ const versionRoute = isLatest
673
+ ? parentRoute
674
+ : parentRoute === '/'
675
+ ? `/${entry}`
676
+ : `${parentRoute}/${entry}`
672
677
 
673
678
  // Recurse into version folder with version context
674
679
  const subResult = await collectPagesRecursive(