@uniweb/build 0.7.2 → 0.7.3
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 +3 -3
- package/src/site/config.js +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"sharp": "^0.33.2"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
+
"@uniweb/content-reader": "1.1.2",
|
|
53
54
|
"@uniweb/runtime": "0.6.0",
|
|
54
|
-
"@uniweb/schemas": "0.2.1"
|
|
55
|
-
"@uniweb/content-reader": "1.1.2"
|
|
55
|
+
"@uniweb/schemas": "0.2.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
package/src/site/config.js
CHANGED
|
@@ -348,8 +348,18 @@ export async function defineSiteConfig(options = {}) {
|
|
|
348
348
|
isBuild = config.command === 'build'
|
|
349
349
|
},
|
|
350
350
|
|
|
351
|
-
resolveId(id) {
|
|
351
|
+
resolveId(id, importer) {
|
|
352
352
|
if (id.startsWith(IMPORT_MAP_PREFIX)) return id
|
|
353
|
+
// Bare specifiers inside our virtual modules (e.g. '@uniweb/core' re-exported
|
|
354
|
+
// from '\0importmap:@uniweb/core') can't be resolved by Rollup because virtual
|
|
355
|
+
// modules have no filesystem context. Resolve from the foundation directory where
|
|
356
|
+
// @uniweb/core is a direct dependency (the site may not have it under pnpm strict).
|
|
357
|
+
if (importer?.startsWith(IMPORT_MAP_PREFIX) && IMPORT_MAP_EXTERNALS.includes(id)) {
|
|
358
|
+
const resolveFrom = foundationInfo.path
|
|
359
|
+
? resolve(foundationInfo.path, 'package.json')
|
|
360
|
+
: resolve(siteRoot, 'main.js')
|
|
361
|
+
return this.resolve(id, resolveFrom, { skipSelf: true })
|
|
362
|
+
}
|
|
353
363
|
},
|
|
354
364
|
|
|
355
365
|
async load(id) {
|