@@ -91,13 +91,14 @@ Options:
9191 --no-prettier disable Prettier (default: true)
9292 --template <file> specify a custom template to use
9393 --no-expand-props disable props expanding (default: true)
94- --ids keep ids within the svg
9594 --ref add svgRef prop to svg
9695 --icon use "1em" as width and height
9796 --no-view-box remove viewBox (default: true)
9897 --native add react-native support with react-native-svg
9998 --replace-attr-value [old=new] replace an attribute value
10099 -p, --precision <value> set the number of digits in the fractional part (svgo)
100+ --ids keep ids within the svg (svgo)
101+ --keep-useless-defs keep elements of <defs> without id (svgo)
101102 --no-title remove title tag (svgo) (default: true)
102103 --tab-width specify the number of spaces by indentation-level (prettier)
103104 --use-tabs indent lines with tabs instead of spaces (prettier)
@@ -389,6 +390,15 @@ Set number of digits in the fractional part. See
389390| ------- | ------------------- | ------------------ |
390391| ` 3 ` | ` --precision <int> ` | ` precision: <int> ` |
391392
393+ ### Useless Defs
394+
395+ Keep elements of ` <defs> ` without ` id ` . It also keep unused symbols. See
396+ [ SVGO ` removeUselessDefs ` plugin] ( https://github.com/svg/svgo ) .
397+
398+ | Default | CLI Override | API Override |
399+ | ------- | --------------------- | ------------------------- |
400+ | ` false ` | ` --keep-useless-defs ` | ` keepUselessDefs: <bool> ` |
401+
392402### Title
393403
394404Remove the title from SVG. See
0 commit comments