solidjs / solidjs/solid-vite-plugin

Document how to build a library for SolidJS

Offen
#97 3 Kommentare 11 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
520
Forks
70
Ø Merge
23 Std. 35 Min.
Gemergte PRs (30 T.)
39

Beschreibung

My team had difficulties in building a component library for SolidJS because we couldn't find any documentation for it.

We have a monorepo where one package is an application which should use components from another package in the repo.
Each has their own build. We use Vite and vite-plugin-solid to build.

vite-plugin-solid seems to use the package.json exports field with a custom import condition solid.

We couldn't find any documentation about this behavior (if there is one please let me know). Only after scouring through this plugin's source code and the NodeJs docs and looking at existing SolidJS component libs we got some idea about how this works.

IMO it the documentation should answer the following questions:

  • How to build a library for solid JS components?
  • How to use package.json exports to export SolidJS code
  • What's the difference in libraries compared to VDOM Frameworks like React, Vue etc (build done by the application vs build done in each package)
  • What's the recommended approach for building in combination with Typescript and/or some CSS preprocessing.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der vite-plugin-solid-Quelle, der Node.js-Dokumentation zu package.json exports und den im Issue erwähnten bestehenden SolidJS-Komponentenbibliotheken. Erledigt ist die Aufgabe, wenn Dokumentation hinzugefügt wurde, die SolidJS-Bibliotheks-Builds, die solid-Exportbedingung, Anwendungs- gegenüber Paket-Builds sowie empfohlene Ansätze zur Vorverarbeitung von TypeScript und CSS erklärt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript, vite
Bereich
build-system, documentation, frontend
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
28/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.