1
In an application Vuejs template Webpack, I need to import a number of SVG’s according to a user’s parameters.
The SVG’s are fixed files, but are dynamically loaded into the application. If I import all the files at once, the bundle
gets very big (around 13mb). I also could not use the dynamic import
because in this case the import
would be an expression, something like import(x)
where x is the file name to be imported according to user parameters.
What would be the solution to this problem? How can I accomplish the Lazy load of a Asset according to user parameters?
You can serve that content by ajax?
– Sergio
It is a solution if it is not possible to perform this import
– Vinícius
@Sergio, one problem I see with ajax is having to control the cache of this file once loaded... something that Dynamic import makes easier
– Vinícius