@uniweb/runtime 1.3.0 → 1.3.2
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/dist/ssr.js +1 -1
- package/dist/ssr.js.map +1 -1
- package/package.json +2 -2
- package/src/setup.js +4 -4
- package/src/ssr-renderer.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/runtime",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Minimal runtime for loading Uniweb foundations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"esbuild": "^0.21.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.27.0 || ^0.28.0",
|
|
45
45
|
"vite": "^7.3.1",
|
|
46
46
|
"vitest": "^4.1.7",
|
|
47
|
-
"@uniweb/build": "1.
|
|
47
|
+
"@uniweb/build": "1.13.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^19.0.0",
|
package/src/setup.js
CHANGED
|
@@ -144,7 +144,7 @@ const ICON_FAMILY_MAP = {
|
|
|
144
144
|
* build's icon MANIFEST, which sits at `content.icons`. A payload carries both
|
|
145
145
|
* under that name and they are unrelated shapes:
|
|
146
146
|
*
|
|
147
|
-
* content.config.icons {
|
|
147
|
+
* content.config.icons { base, cdn } ← this
|
|
148
148
|
* content.icons { used, families, count } ← the manifest
|
|
149
149
|
*
|
|
150
150
|
* Exported for tests only; `index.jsx` names its imports, so this is not part
|
|
@@ -154,7 +154,7 @@ const ICON_FAMILY_MAP = {
|
|
|
154
154
|
* @returns {Function} Resolver: (library, name) => Promise<string|null>
|
|
155
155
|
*/
|
|
156
156
|
export function createIconResolver(iconConfig = {}) {
|
|
157
|
-
const CDN_BASE = iconConfig.
|
|
157
|
+
const CDN_BASE = iconConfig.base || DEFAULT_ICON_BASE
|
|
158
158
|
const useCdn = iconConfig.cdn !== false
|
|
159
159
|
const cache = new Map()
|
|
160
160
|
|
|
@@ -282,8 +282,8 @@ export function initUniweb({ content, foundation, extensions = [], routingCompon
|
|
|
282
282
|
uniweb.routingComponents = routingComponents
|
|
283
283
|
uniweb.localeSwitch = localeSwitch
|
|
284
284
|
// `config.icons`, NOT `content.icons` — the latter is the build's manifest
|
|
285
|
-
// (`{used, families, …}`), which carries no `
|
|
286
|
-
// pinned every browser fetch to the built-in default and made `icons.
|
|
285
|
+
// (`{used, families, …}`), which carries no `base`, so passing it here
|
|
286
|
+
// pinned every browser fetch to the built-in default and made `icons.base`
|
|
287
287
|
// / `icons.cdn: false` inert. ssr-renderer.js reads both keys correctly
|
|
288
288
|
// (manifest for prefetch, config for the base), so the two lanes disagreed:
|
|
289
289
|
// honored at prerender, ignored in the browser.
|
package/src/ssr-renderer.js
CHANGED
|
@@ -442,7 +442,7 @@ export async function prefetchIcons(siteContent, uniweb, onProgress = () => {})
|
|
|
442
442
|
const icons = siteContent.icons?.used || []
|
|
443
443
|
if (icons.length === 0) return
|
|
444
444
|
|
|
445
|
-
const cdnBase = siteContent.config?.icons?.
|
|
445
|
+
const cdnBase = siteContent.config?.icons?.base || DEFAULT_ICON_BASE
|
|
446
446
|
|
|
447
447
|
onProgress(`Fetching ${icons.length} icons for SSR...`)
|
|
448
448
|
|