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
dynamically import not working when build #24
Comments
Hi, thanks for reporting. Could you share an example project so I can reproduce the problem, and investigate how to resolve it. |
I made an example here: |
Hi @jpkleemans as I mentioned my another issue in #25 (comment) another thing I was trying to do is dynamically load SVG from a public directory(I ask for user input so I have to make it dynamic). I write but if I turn it in to However, using This is related to #25 If I turn url from BTW I am using nuxt + TS if you are going to test it. |
@zinken7 does it work when omitting the |
Hi! All imports on server-side (raw,url,component) calling error.
On client-side - its working; Code example:
|
Resolve this problem, create a functional component:
|
@silencerspirit thanks for posting your solution! |
require is not defined |
@cdwmhcc you need install plugin In
and if you use
|
Not working in nuxt.js 3 |
U welcome https://stackblitz.com/edit/github-1ck5ek?file=app.vue :) |
I know the reason. Cannot use
|
@silencerspirit Thank you for your reply. It will load all icons. I need to load on demand. |
@jpkleemans Hi, I used this but failed when build for production.
It's working in dev mode
The text was updated successfully, but these errors were encountered: