facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.72k stars 26.85k forks source link

Enable and configure svgo usage with svgr #7642

Open MDSilviu opened 5 years ago

MDSilviu commented 5 years ago

As i understood svgr svgo is disabled by default and can't be activated Is there any chance you could allow activating svgo to optimize the svgs? This way we could use .svgo.yml file to configure it depending on our needs

heyimalex commented 5 years ago

Check #5062. I think we'd accept something that allowed it to run in an safe way in production builds as long as it worked for both url and component style imports. We probably won't accept anything that supports or looks for another configuration file.

You can always run it separately before build? How many svgs do you have?

MDSilviu commented 5 years ago

@heyimalex i see. I have multiple configurations for the svgs since i use for icons inline svgs and also if i need illustrations. I'm usually stripping everything out form the icons and that's why i need svgo. For illustrations i usually allow colors and some other attributes I ended up using the cli