Error Loading SVGs #88
-
I am trying to load SVGs but I am getting the following: This is the following code:
Any recommendations? Edit: This code is nested in a "components" folder. The SVG file does exist at that path. I am able to access it using a different method, but I would like to access it through require for compatibility purposes. Does SFC just not support this yet or am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This situation is expected. Dependances statistical analysis is only done on If you need to use the
In your case, since your filename is an expression, the best solution is to use
|
Beta Was this translation helpful? Give feedback.
This situation is expected. Dependances statistical analysis is only done on
import
statement,If you need to use the
require()
(synchronous) form like in your example, the module must be provided at initialisation.eg.
In your case, since your filename is an expression, the best solution is to use
import()
function :