Can you run code from an external file?

I am making a SPA that uses SVGs with content like this:

  <image :xlink:href="require(`@/assets/roomplan-${this.$}.png`)" />

The SVGs calls vuejs functions and axios store.

The problem is, when the application is deployed, I will need to add more of these SVG files to the project from time to time. The way it is structured now, I will need to re-build the project each time.

Can these SVG files be made external to the project, so that I can upload new SVG files, and they will work in the project without having to rebuild the project everytime ?

The code provided is currently not properly formatted for this forum. In its current state, it’s hardly readable and makes it hard for people to help you.

Please read the following guide about how to properly format code, and then edit your topic accordingly.