Nelson Michael
Nelson Michael

Reputation: 69

How to build a component library with vue3 + vite + shadcn-vue

I’m trying to setup a custom component library for my app( follows a micro-frontend architecture).

I’m done setting it up and configuring vite to build in library mode. When I test the components inside the library it works fine, but when I try to use in a consuming app, the component appears unstyled, it’s almost like it’s not even the component that’s being rendered because I don’t see the props on it.

This is the behavior I’m getting when I use the shadcn-vue button component and export that from my library.

Can someone help me figure this out? Please let me know, so I can share the config files.

Note: The setup was done today, so I’m using the latest version of everything except for tailwind since shadcn-vue is not yet compatible with tailwind v4

Upvotes: 0

Views: 99

Answers (0)

Related Questions