I’m working with Vue 3 and trying to dynamically render components within slots based on their tags. Initially, I was able to identify components directly using slots.default().find(slot => slot.type === ‘<tag-name>’), which worked perfectly when components were not loaded asynchronously.
However, after refactoring my code to use async components, I’ve noticed that my components are now wrapped in AsyncComponentWrapper, and I can no longer directly access the original component’s tag or type using the same approach.
I tried inspecting the AsyncComponentWrapper to find the resolved component using slot.type.__asyncResolved, but it returns undefined.
I was expecting to find a way to unwrap or resolve the async component from AsyncComponentWrapper so I can match it based on its original tag or name as before.