ben-eb/gulp-svgmin

Breaks certain svgs

MarcelRobitaille opened this issue · 4 comments

I just switched from gulp-svgo because that doesn't seem to exist any more. When I run this, some of my svgs break. I am using 1.2.0

Probably best to report upstream with a specific SVG that doesn't compress properly. Note that you can disable problematic transforms with the options object.

https://github.com/ben-eb/gulp-svgmin#plugins

I never had this issue with gulp-svgo, though. shouldn't be svgo's fault.

This module delegates all of its transforms to SVGO. Any issues with this wrapper will be reproducible with other means, such as via command line or JS API. Perhaps the gulp-svgo plugin was using an old version of SVGO which didn't break your SVG file? In any case, this wrapper does nothing special and your issue should be reported upstream.

You can verify that with plain node, if you wish:

var SVGO = require('svgo');
var svgo = new SVGO({}); // pass options here

svgo.optimize('<svg>...</svg>', function (result) {
  console.log(result.data);
});

Will do. Thanks!