SolidJSS
SolidJSโ€ข6mo agoโ€ข
33 replies
siduck

How to bundle components into a package with tsup

Hi, new to making library stuff, I have a list of
components/
+
index.ts file


index.ts
exports most of the components, so I'd want

import { Btn } from "abc-ui"`

But there are some components which need their own dir, like
import { Tabs, TabsList .. } from "abc-ui/tabs"

I have not made a package before so idk how bundling etc works ๐Ÿ˜ฆ
When I ran the tsup command, it bundled the entire list of named exports in the index.ts file, what about other components which arent imported in the main
index.ts
file
image.png
Was this page helpful?