@uniweb/build 0.4.6 → 0.4.8

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/prerender.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
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.1.2",
54
- "@uniweb/runtime": "0.5.8"
54
+ "@uniweb/runtime": "0.5.9"
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.3.9"
63
+ "@uniweb/core": "0.3.10"
64
64
  },
65
65
  "peerDependenciesMeta": {
66
66
  "vite": {
package/src/prerender.js CHANGED
@@ -556,6 +556,12 @@ export async function prerenderSite(siteDir, options = {}) {
556
556
  const uniweb = createUniweb(siteContent)
557
557
  uniweb.setFoundation(foundation)
558
558
 
559
+ // Set base path from site config so components can access it during SSR
560
+ // (e.g., <Link reload> needs basePath to prefix hrefs for subdirectory deployments)
561
+ if (siteContent.config?.base && uniweb.activeWebsite?.setBasePath) {
562
+ uniweb.activeWebsite.setBasePath(siteContent.config.base)
563
+ }
564
+
559
565
  // Set foundation capabilities (Layout, props, etc.)
560
566
  if (foundation.capabilities) {
561
567
  uniweb.setFoundationConfig(foundation.capabilities)