You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-6Lines changed: 49 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,8 @@ Solid-UI provides both **UMD** and **ESM** bundles for direct browser usage. Bot
69
69
70
70
### UMD Bundle (Global Variable)
71
71
72
+
If you use the legacy UMD bundle (`solid-ui.js` / `solid-ui.min.js`), `rdflib` must define `window.$rdf` before `solid-ui` loads. If `rdflib` is missing, `solid-ui` will throw `ReferenceError: $rdf is not defined`.
73
+
72
74
Load via `<script>` tags and access through global variables `window.$rdf`, `window.SolidLogic`, and `window.UI`.
73
75
74
76
```html
@@ -273,17 +275,58 @@ import { Header } from 'solid-ui/components/header'
Importing this module automatically registers `<solid-ui-header>` as a custom element. See [src/v2/components/header/README.md](src/v2/components/header/README.md) for the full API reference and usage examples.
<solid-ui-signup-buttonlabel="Get a Pod"signup-url="https://solidproject.org/get_a_pod"></solid-ui-signup-button>
319
+
```
277
320
278
321
### Component build pipeline
279
322
280
-
Web components use a two-stage build to produce a clean public layout without exposing internal source paths:
323
+
Web components use a two-stage build to produce a clean public runtime layout while keeping internal TypeScript artifacts separate:
281
324
282
325
1.**webpack** (`npm run build-dist`) bundles each component entrypoint and emits the runtime files to `dist/components/<name>/index.js` and `dist/components/<name>/index.esm.js`.
283
-
2.**tsc** (`npm run build-js`) emits declaration files mirroring the source tree, so they land at `dist/v2/components/<name>/index.d.ts`.
284
-
3.**`scripts/build-component-dts.mjs`** (runs automatically after tsc as part of `postbuild-js`) writes a thin re-export wrapper at `dist/components/<name>/index.d.ts`, bridging the tsc output to the public package location.
326
+
2.**tsc** (`npm run build-js`) emits internal declaration and JS artifacts mirroring the source tree under `dist/v2/components/<name>/`.
327
+
3.**`scripts/build-component-dts.mjs`** (runs automatically after tsc as part of `postbuild-js`) writes thin public declaration wrappers at `dist/components/<name>/index.d.ts`, re-exporting from the internal `dist/v2/components/<name>/` output.
285
328
286
-
This keeps the `package.json` subpath export fully aligned:
329
+
This keeps the `package.json` subpath export fully aligned while exposing only the public `dist/components/...` layout:
287
330
288
331
```json
289
332
"./components/header": {
@@ -293,7 +336,7 @@ This keeps the `package.json` subpath export fully aligned:
293
336
}
294
337
```
295
338
296
-
Consumers never see the internal `v2` path; it is an implementation detail of the source tree.
339
+
Consumers never import from `dist/v2/components/...`; that path is an internal build artifact only.
0 commit comments