@uniweb/runtime 0.5.17 → 0.5.18

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 +1 -1
  2. package/src/index.jsx +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/runtime",
3
- "version": "0.5.17",
3
+ "version": "0.5.18",
4
4
  "description": "Minimal runtime for loading Uniweb foundations",
5
5
  "type": "module",
6
6
  "exports": {
package/src/index.jsx CHANGED
@@ -107,7 +107,9 @@ async function loadFoundationCSS(url) {
107
107
  */
108
108
  async function loadFoundation(source) {
109
109
  const url = typeof source === 'string' ? source : source.url
110
- const cssUrl = typeof source === 'object' ? source.cssUrl : null
110
+ // Auto-derive CSS URL from JS URL by convention: foundation.js assets/foundation.css
111
+ const cssUrl = typeof source === 'object' ? source.cssUrl
112
+ : url.replace(/[^/]+\.js$/, 'assets/foundation.css')
111
113
 
112
114
  console.log(`[Runtime] Loading foundation from: ${url}`)
113
115