I trying to build a vue component lib with vite, and I get this error when trying to export the components
Class constructor VueCustomElement cannot be invoked without 'new'
the entry point of the lib:
import { defineCustomElement } from "vue";
import Bar from "./MyBar.ce.vue";
const MyBar = defineCustomElement(Bar);
export { MyBar };
export function register() {
customElements.define("my-bar", MyBar);
}
if I do now use defineCustomElement and export the component directly, it works, but I don't get import completion and props suggestions... I think to solve that I need to use the defineCustomElement but it don't work