-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async imports with variables throw error #12655
Comments
Hi, @MichalCipa sorry for the late answer. It is a current limitation of Vite that we don't support unpredictable dynamic imports. (#12806). If you really need this, you can use webpack 5 by setting BTW I've looked into your reproduction. For dynamic components, you can simply name them! Components discovery will lazily load them for you. Example: https://stackblitz.com/edit/github-gyhqth-kwtjtb?file=app.vue |
Hi, @pi0 |
@pi0 It turns out that this code for dynamic icon import will never work for vite?
This code example from |
@grindpride I'm wondering if you've found a way to go about dynamic icon import with vite? I'm trying to do something similar in Nuxt 3 and its a headache |
Any solution on this? |
@Utitofon-Udoekong @miracleonyenma
nuxt.config.ts
Icon.vue
|
Any update? @pi0 @danielroe |
When SSR: true, the problem still exists |
Any update on this? |
Any updates ? |
Environment
Linux
v14.16.0
3-3.0.0-27237303.6acfdcd
npm
Webpack
-
-
-
Describe the bug
Using dynamic imports with variables throw error.
Example
Error
Reproduction
https://stackblitz.com/edit/github-gyhqth?file=app.vue
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: