Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Document how to build a library for SolidJS

未关闭
#97 3 条评论 11 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
28/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript, vite

调研方向

从 vite-plugin-solid 源码、Node.js 关于 package.json exports 的文档,以及 issue 中提到的现有 SolidJS 组件库开始。完成的标准是添加文档,说明 SolidJS 库构建、solid 导出条件、应用构建与包构建的区别,以及推荐的 TypeScript 和 CSS 预处理方法。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
TypeScript
星标
520
派生
70
平均合并
23 小时 35 分钟
30 天内合并 PR
39

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid-vite-plugin 的其他 Issue

查看 solidjs/solid-vite-plugin 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。