Issue with Vite Build Not Including Dependent Components in UMD Format
Hello everyone,
I'm working on a monorepo with two Nuxt3 applications:
shadcn-components
and my-components-library
.
- shadcn-components: Contains basic UI components.
- my-components-library: Contains custom components built using shadcn-components
.
These projects are connected using the Nuxt Layers feature. I aim to build my-components-library
into a UMD format using Vite for use in my Python web app.
Problem:
When building my-components-library
with Vite, the resulting UMD file includes definitions for its own components but not for those from shadcn-components
. Instead, I see references like resolveComponent('UiButton')
without actual definitions.
Questions:
1. How can I configure Vite to include components from shadcn-components
in the UMD build?
2. Is there a Vite configuration or plugin to resolve and bundle these external components?
3. Has anyone faced this issue and found a solution?
Any help or suggestions would be appreciated. Thank you!0 Replies