Open DawidMmM opened 6 years ago
maybe I am wrong.
this loader takes svg file and returns pure <xml>
code as a string.
U can paste result (completed xml
code) into html
using innerHTML
or using dangerouslySetInnerHTML={{__html: svg}
via React, where svg
will be your received
following on the same issue.
@bringmetheaugust :- When I print the svg value I'm getting something like this: module.exports = webpack_public_path + "ce988d232617f71a03760e30d41171bd.svg";
@voletiswaroop here solution without frameworks: https://stackoverflow.com/a/56049896/10442501 here solution for React: https://stackoverflow.com/a/34257985/10442501 if U still have the same issue, after checking these solutions, share Your webpack configuration and code
<main>
<%= require("./img/close.svg") %>
</main>
and remove svg
from url-loader regexp
Is there anyone who knows how to load svg files from index.html?
This is how i try to load svg files in my html file:
and this is my webpack.common.js:
and any of my paths don't work. I really don't know how to make it works.