ben-eb / gulp-svgmin

Minify SVG files with gulp.
MIT License
341 stars 35 forks source link

ViewBox will be removed regardless disabled plugin #42

Closed bm2u closed 8 years ago

bm2u commented 8 years ago

As already mentioned in svgo gulp-svgmin does not respect the disabled "removeViewBox"-Plugin. My config looks like:

options : {
    plugins: [
        {
            removeViewBox: false
        },{
            addClassesToSVGElement: {
                classNames: ['svgo']
            }
        }
    ],
    js2svg: {
        pretty: true
    }
}

The class has been added to the svg element, but the viewbox unfortunately removed. Any ideas?

ben-eb commented 8 years ago

The options are passed directly to SVGO, we don't do anything special here. Perhaps it has some trouble with your particular SVG input?

bm2u commented 8 years ago

@ben-eb thx,known issue @ svgo.

ben-eb commented 8 years ago

Closing this in favour of https://github.com/svg/svgo/issues/505