react-svg-loader
react-svg-loader copied to clipboard
Performance: Module is unreasonable huge
It's 400 KB minified+gzipped though.. It seems like around half is babel stuff that will probably be used anyway and brough up as a top level requirement by node but 200 KB is still a lot!!
https://bundlephobia.com/[email protected]

All svg files you use might not be 200 KB combined :P
Tip to others before using this. If you convert inline styles to React/jsx inline styles and avoid or move <style> styling to separate css files then you could use this approach instead https://css-tricks.com/creating-svg-icon-system-react/
you might want to make it possible to send in inline style to these components also though. I guess you could make a parent component that you extend from instead of React.Component but that has many downsides also.. Not sure how you could keep the code DRY in any other way though..