webpack-contrib / svg-inline-loader

Inline SVG loader with cleaning-up functionality

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One set of Quotation marks coming extra

rravithejareddy opened this issue · comments

One set of Quotation marks coming extra on html, when i am using in react, see the below code
{require('!svg-inline-loader!./../../../../images/icons/added_to_list.svg')} and output is

screenshot 98

because of extra quotations react treating as text, when i remove the extra quotations it's working fine, please help me to sort it out,

Thanks in advance.

Having the same issue.

I think you need to use Params like below in web-pack, i don't know whether this module have quotation param or not
{
test: /.svg$/,
loader: 'svg-inline-loader?classPrefix'
}

I solved by using another module(svg-url-loader) like below in web-pack
{
test: /.svg$/,
loader: ['svg-url-loader?noquotes=true']
}