@uniweb/build 0.31.0 → 0.32.0

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 +7 -7
  2. package/src/site/config.js +25 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,15 +59,15 @@
59
59
  "js-yaml": "^4.1.0",
60
60
  "sharp": "^0.35.3",
61
61
  "yaml": "^2.5.0",
62
+ "@uniweb/content-writer": "^0.3.4",
63
+ "@uniweb/content-reader": "^1.2.4",
64
+ "@uniweb/semantic-parser": "^1.4.0",
62
65
  "@uniweb/schemas": "^0.2.13",
63
66
  "@uniweb/theming": "^0.1.15",
64
- "@uniweb/semantic-parser": "^1.4.0",
65
- "@uniweb/content-reader": "^1.2.4",
66
- "@uniweb/projections": "^0.5.3",
67
- "@uniweb/content-writer": "^0.3.4"
67
+ "@uniweb/projections": "^0.5.4"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@uniweb/runtime": "^0.13.4"
70
+ "@uniweb/runtime": "^0.13.5"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -76,7 +76,7 @@
76
76
  "@tailwindcss/vite": "^4.0.0",
77
77
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
78
78
  "vite-plugin-svgr": "^4.0.0",
79
- "@uniweb/core": "^0.15.0"
79
+ "@uniweb/core": "^0.16.0"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "vite": {
@@ -320,7 +320,31 @@ export async function defineSiteConfig(options = {}) {
320
320
  // Point #foundation at a virtual noop module.
321
321
  alias['#foundation'] = '\0__foundation-noop__'
322
322
  } else if (foundationInfo.type !== 'url') {
323
- // Bundled mode: #foundation points to the actual package
323
+ // Bundled mode: #foundation points to the actual package.
324
+ //
325
+ // ⛔ **A BARE SPECIFIER, NOT `foundationInfo.path` — and the obvious
326
+ // "improvement" is measured and wrong.** We hold the resolved path right
327
+ // here, and handing vite the *name* instead is what lets its node_modules
328
+ // lookup disagree with ours (the whole reason
329
+ // `uniweb:ensure-foundation-entry` now runs `checkFoundationResolution`).
330
+ // Collapsing the two by aliasing to the path looks like it deletes that bug
331
+ // class. It does not:
332
+ //
333
+ // A vite alias is PREFIX replacement, so `#foundation/styles` — which the
334
+ // site's own `entry.js` imports — becomes `<path>/styles`, a filesystem
335
+ // path. That bypasses the foundation's `exports` map, and the map is where
336
+ // `./styles` → `./styles.css` lives (along with `./dist` and
337
+ // `./dist/styles`). Measured 2026-09-01 on a stock marketing scaffold:
338
+ // `[vite:load-fallback] Could not load <path>/src/styles (imported by
339
+ // entry.js): ENOENT`. A HEALTHY project fails to build.
340
+ //
341
+ // Splitting it — exact `#foundation` → path, `#foundation/*` → name — is
342
+ // worse still: on a diverged tree the entry would come from one directory
343
+ // and the stylesheet from another, which is a state neither consistent
344
+ // option can reach.
345
+ //
346
+ // ⇒ **The name is load-bearing because the exports map is.** Detecting the
347
+ // disagreement is the correct shape; eliminating it costs the exports map.
324
348
  alias['#foundation'] = foundationInfo.name
325
349
  }
326
350