TL’DR: You can’t (Just some workarounds).

I’m currently working on a project, and there was a need to load SVG images to the page. We thought like, ok, not a big deal, the tag SVG can help us doing that. Worst decision ever.

First, let me give you an example of what we tried to do:

<svg viewBox=”0 0 100 100">
<use xlink:href=”/path/to/svg.svg"></use> </svg>

Just to keep in mind, our stack is React, Redux, es6, Webpack and c# for the backend.

So, this worked fine while we were in localhost and the SVG was loaded. …

Ruben Azevedo