SVG to React Loader
A Webpack Loader to convert SVG into React Component
Feature
- SVG optimazation using SVGO, default config see here
- transform svg slug attr name (like
fill-opacity
) to camel case (likefillOpacity
) - generate shadow mask covering svg to optimize svg icon clicking experience
Installation
tnpm install salt-svg-loader
Usage
var React = ;var Icon = ; moduleexports = React;
Fork svg2react-loader, and has been reconstructed and optimized.