ben-eb / gulp-svgmin

Minify SVG files with gulp.
MIT License
340 stars 34 forks source link

why this plugin remove classes of path? #91

Closed seriiserii825 closed 3 years ago

seriiserii825 commented 5 years ago

I have this svg `<?xml version="1.0" encoding="utf-8"?>

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">

<path d="M33.1,17.9L15.2,0l-2.8,2.8l4.8,4.8L6.9,17.9c-1.2,1.2-1.2,3.1,0,4.2l11,11c0.6,0.6,1.4,0.9,2.1,0.9s1.5-0.3,2.1-0.9l11-11 C34.3,21,34.3,19,33.1,17.9z M10.4,20l9.6-9.6l9.6,9.6H10.4z M38,23c0,0-4,4.3-4,7c0,2.2,1.8,4,4,4s4-1.8,4-4C42,27.3,38,23,38,23z" />

`

after gulp-svgmin i get path without classes `

<path d="M33.1 17.9L15.2 0l-2.8 2.8 4.8 4.8L6.9 17.9c-1.2 1.2-1.2 3.1 0 4.2l11 11c.6.6 1.4.9 2.1.9s1.5-.3 2.1-.9l11-11c1.2-1.1 1.2-3.1 0-4.2zM10.4 20l9.6-9.6 9.6 9.6H10.4zM38 23s-4 4.3-4 7c0 2.2 1.8 4 4 4s4-1.8 4-4c0-2.7-4-7-4-7zM0 40h48v3H0z"/>

`

How to fix this?

rejas commented 5 years ago

Does that happen also when you use the online app https://jakearchibald.github.io/svgomg/ ?

ben-eb commented 3 years ago

Hey @seriiserii825 , please could you report this to https://github.com/svg/svgo if you are still having this issue? This plugin is a thin wrapper on top of svgo to use it with gulp, and so this is better reported upstream. Thanks. 👍