@uniweb/build 0.8.8 → 0.8.10
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 +4 -4
- package/src/site/config.js +18 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
53
|
"@uniweb/content-reader": "1.1.4",
|
|
54
|
-
"@uniweb/
|
|
55
|
-
"@uniweb/
|
|
54
|
+
"@uniweb/runtime": "0.6.6",
|
|
55
|
+
"@uniweb/schemas": "0.2.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@tailwindcss/vite": "^4.0.0",
|
|
62
62
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
63
63
|
"vite-plugin-svgr": "^4.0.0",
|
|
64
|
-
"@uniweb/core": "0.5.
|
|
64
|
+
"@uniweb/core": "0.5.7"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"vite": {
|
package/src/site/config.js
CHANGED
|
@@ -87,7 +87,7 @@ function detectFoundationType(foundation, siteRoot) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
// Check if it's a local workspace sibling
|
|
90
|
+
// Check if it's a local workspace sibling (directory name matches package name)
|
|
91
91
|
const localPath = resolve(siteRoot, '..', name)
|
|
92
92
|
if (existsSync(localPath)) {
|
|
93
93
|
return {
|
|
@@ -97,6 +97,23 @@ function detectFoundationType(foundation, siteRoot) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// Check if it's a file: dependency (co-located projects where dir name ≠ package name)
|
|
101
|
+
// e.g. "marketing-foundation": "file:../foundation" in marketing/site/package.json
|
|
102
|
+
try {
|
|
103
|
+
const pkg = JSON.parse(readFileSync(resolve(siteRoot, 'package.json'), 'utf8'))
|
|
104
|
+
const dep = pkg.dependencies?.[name]
|
|
105
|
+
if (dep && dep.startsWith('file:')) {
|
|
106
|
+
const filePath = resolve(siteRoot, dep.slice(5))
|
|
107
|
+
if (existsSync(filePath)) {
|
|
108
|
+
return {
|
|
109
|
+
type: 'local',
|
|
110
|
+
name,
|
|
111
|
+
path: filePath
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} catch {}
|
|
116
|
+
|
|
100
117
|
// Check in foundations/ directory (for multi-site projects)
|
|
101
118
|
const foundationsPath = resolve(siteRoot, '..', '..', 'foundations', name)
|
|
102
119
|
if (existsSync(foundationsPath)) {
|