solidjs / solidjs/solid-vite-plugin

Document how to build a library for SolidJS

Open
#97 3 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
520
Forks
70
Avg merge
23h 35m
Merged PRs (30d)
39

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the vite-plugin-solid source, Node.js documentation for package.json exports and the existing SolidJS component libraries mentioned in the issue. Done means adding documentation that explains SolidJS library builds, the solid export condition, application versus package builds, and recommended TypeScript and CSS preprocessing approaches.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
build-system, documentation, frontend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.