I am creating an icon component with unplugin-icon and in usual case i can import for example
//script
import IconCopy from '~icons/prime/copy'
//template
<IconCopy/>
it works but it feels unconvenient to import one by one if we want ot use another icon so i create a dynamic component named Eunoicon.vue
<script setup>
const props = defineProps({
icon : {type:String}
})
const from = `~icons/prime/${props.icon}`
const TheIcon = await import(/* @vite-ignore */from)
console.log('ti',TheIcon)
</script>
<template>
<TheIcon/>
</template>
but when i try to import this to a component it throw error Uncaught (in promise) TypeError: Failed to resolve module specifier '~icons/prime/copy'.
Is any suggestion for this approach or any icon library that provide simple way something like . I've tried vue font awesome but still it's not as simple as i want.