ben-eb/gulp-svgmin

transformsWithOnePath plugin

dawidvdh opened this issue · 5 comments

Hi,

the transformsWithOnePath plugin, produces the following error [TypeError: Cannot read property 'value' of undefined]

this is what my task currently looks like:

gulp.src([cfg.paths.assets+"webfont/*.svg"])
            .pipe(svgmin({
                plugins: [{
                    transformsWithOnePath: true
                }]
            }))
            .pipe(gulp.dest(cfg.paths.dest+'fonts/icons/'));

Any Help would be Greatly Appreciated.

Do you have a full stack trace?

Closing as stale.

@ben-eb It is because transformsWithOnePath relies on width / height attribute, which might not exist because of the removeDimensions optimization. I cannot find a way to easily add back width / height. Could you re-open this issue?

@breeswish The svgo tracker is probably a better place for this issue.

Thanks, you are right. I wasn't noticed that this is gulp-svgmin :P