this work :
npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values "#3abca7={props.color1}" --replace-attr-values "hid1={props.hid1}"
but i need for every value use --replace-attr-values its possible use multiple in one
and help write this as webpack package.json script
right now i use it as
"scripts": {
"SVGR":"npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values '#3abca7={props.color1}' --replace-attr-values 'hid1={props.hid1}'"
}
Hello @gwmaster, I am sorry but I don't understand your problem. Can you try to explain it better?
I think he's trying to say that he needs to replace multiple attribute values, and he's currently just adding --replace-attr-values for every single one. He's looking for a way to include multiple replacement values in one go.
Yeah but it is not currently possible, I am sorry this is the way to handle it in CLI.
In v5, you would be able to use , as separator:
npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values "#3abca7={props.color1},hid1={props.hid1}"
Most helpful comment
In v5, you would be able to use
,as separator: