diff options
author | Broc Seib <broc.seib@gmail.com> | 2019-10-01 17:24:57 -0400 |
---|---|---|
committer | Broc Seib <broc.seib@gmail.com> | 2019-10-01 17:34:49 -0400 |
commit | 12e5099c921334a1c0b092fb965b4c9ee8c8bc8e (patch) | |
tree | 8c582231a88a9a86cc5baf4f6d40dc92783a189d /gulpfile.js | |
parent | dfc09b8e04f6e4829c29a68106eb4af5be76a2ff (diff) | |
download | plyr-12e5099c921334a1c0b092fb965b4c9ee8c8bc8e.tar.lz plyr-12e5099c921334a1c0b092fb965b4c9ee8c8bc8e.tar.xz plyr-12e5099c921334a1c0b092fb965b4c9ee8c8bc8e.zip |
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
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js index 2623ebaf..3a4c7bdf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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)) |