Vue version
3.5.18
Link to minimal reproduction
https://github.com/MakhBeth/vue-vite-compound-component-issue/tree/main
Steps to reproduce
- Run the app in the development environment with
npm run dev — everything works as expected.
- Build the app with
npm run build.
- Launch the built app from the dist folder using
npm run start.
- Observe that the component passed as an object property is not rendered.
What is expected?
Same output between dev environment and production: the component should be rendered when passed as an object property via props.
What is actually happening?
In build env, instead of having the component rendered, you will have an empty html tag.
System Info
Any additional comments?
I'm developing a Vue library based on Tanstack Query. Our library enriches the form object, with some components, like Input, Errors, etc, that help manage the form.
Everything works fine in dev environment, but when we build, all the <form.Input /> tags are transformed in simple html tags like <form.input></form.input>