Fails to build with some components using script setup #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: profectus/Profectus#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some components cause an error that will appear similar to the below:
The fix for this is to convert the component from script setup back to the traditional composition API approach for SFCs. (or presumably options API, although that's discouraged)
The issue appears to be from it importing the type from a .ts file which then imports the component in order to set the Component property on the feature. However, every renderable feature does this, and only a couple seem to have this issue. The current "fix" is considered a workaround and should be properly fixed.
As of writing, the components with this issue are Tree.vue and Grid.vue
Several other files seem to also have had this issue, and I am yet to find a common denominator.
A note about the workaround: I was initially defining components like so:
Unfortunately, it would appear that in addition to being significantly less documented, this method also has trouble with accurately determining props, and no way to define emits. So instead, you need to do this fairly annoying cross between the options and composition API:
Most notably, this requires rewriting all the props and needing to do the annoying
Object as PropType<Foo>
stuff to support typing correctly.