Loading/ Parsing SVG files with rspack #3027
Closed
pushkargupta9807
started this conversation in
General
Replies: 1 comment
-
svg-react-loader is supported, you can see a example here #3030 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
from the webpack world we have a loader svg-react-loader which is used as below in the file importing the svg asset and creating react component.
Examle:
var TaskComplete = require('-!@svg-react-loader?name=Unlock!../../../lib/Assets/TaskComplete.svg');;
......
icons.TaskComplete = React.createElement(TaskComplete, null);
I tried and I am not sure if svg-react-loader is compatible with rspack yet. With the compatible @svgr/webpack I am also not sure , what changes would I have to make for the above code to work.
Any ideas, suggestions would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions