-
-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Description
Code below works well, SubComponent is colored green in the html template:
<template>
<h1>{{ title }}</h1>
<SubComponent></SubComponent>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import SubComponent from "./SubComponent.vue";
export default defineComponent({
components: {
SubComponent
},
setup() {
return {
title: "Works well"
};
}
});
...
However, if I store the result of defineComponent in a const and then export it, SubComponent is now colored red in template.
Template and imports same in both cases.
const component = defineComponent({
components: {
SubComponent
},
setup() {
return {
title: "Confuses Volar"
};
}
});
export default component;
...
I need the output from defineComponent for an inhouse framework purpose.
How can I avoid confusing Volar? Or should it get confused by this?