Preserve viewBox attribute in SVG sprite symbols
When generating the SVG sprite (using imagemin and svstore) the imagemin step needs to NOT cleanup/remove the viewBox attributes from the individual svg files. fixes #1306
This commit is contained in:
parent
dfc09b8e04
commit
12e5099c92
@ -222,7 +222,11 @@ Object.entries(build.sprite).forEach(([filename, entry]) => {
|
||||
gulp
|
||||
.src(src)
|
||||
.pipe(plumber())
|
||||
.pipe(imagemin())
|
||||
.pipe(imagemin([
|
||||
imagemin.svgo({
|
||||
plugins: [{ removeViewBox: false }]
|
||||
})
|
||||
]))
|
||||
.pipe(svgstore())
|
||||
.pipe(rename({ basename: path.parse(filename).name }))
|
||||
.pipe(size(sizeOptions))
|
||||
|
Loading…
x
Reference in New Issue
Block a user