Support lazy-loaded component for the `is` attribute
Version
3.2.29
Reproduction link
Steps to reproduce
In Vue 3, the is
attribute supports only a String
or a Component
. That means lazy-loaded dynamic components don't work.
What is expected?
In Vue 2, the code below works fine:
<template>
<component :is="dynamicComponent"></component>
</template>
<script>
export default {
props: ['name'],
computed: {
dynamicComponent() {
return () => import(`./icons/${this.name}.vue`);
},
},
};
</script>
What is actually happening?
In Vue 3 however, it doesn't.