Dynamic icon import in Vue 3, Vite #1419
Replies: 1 comment
-
Sorry for the late reply, I still don't get a notification from Discussions. Only drawbacks are:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to use a generic Icon component without importing every icon. Using a dynamic import like this works:
Icon.vue
MyPage.vue
Can you see any drawbacks? I think this should result in a tree-shaken output when built with Vite.
Beta Was this translation helpful? Give feedback.
All reactions