I've recently been working on my own component library for Vue 3. When I import it into my main project for use, I get this error in the browser.
[Vue warn]: Invalid VNode type: Symbol("Fragment") (symbol) at
I can't tell exactly what is causing the error, but I feel like it has something to do with <slot />
. I read that it could be caused by having two Vue instances, but if that is the case it is really hard to remove one them. I've tried using different "packers" just in case (Rollup, Webpack, Parcel), with different setting variations for each one, but nothing changes. Is there some concept I am missing?
For some context, here is a summarized version of the component file from my library:
<template>
<div class="field">
<label class="label">{{ label }}</label>
<slot />
</div>
</template>
<script>
export default {
name: "b-field",
props: {
label: String
}
};
</script>
It is being used like this in my app, where <b-input />
is another component.
<b-field>
<b-input />
</b-field>
This has really stumped me. Any help, or at least tips to point me in the right direction, is welcome.