Skip to content

Commit

Permalink
Fix svgo config to avoid removal of viewBox attr in svg files (#9362)
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya authored Feb 19, 2025
1 parent 5ba13e3 commit 9612202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ gulp.task('build-images', () => {
return IS_PRODUCTION_BUILD && file.path.match(/\.svg$/);
};

// See https://github.com/ben-eb/gulp-svgmin#plugins
// See https://github.com/ben-eb/gulp-svgmin#plugins and
// https://github.com/ben-eb/gulp-svgmin/issues/125#issuecomment-972082805
const svgminConfig = {
plugins: [
{
// svgo removes `viewBox` by default, which breaks scaled rendering of
// the SVG.
//
// See https://github.com/svg/svgo/issues/1128
name: 'removeViewBox',
active: false,
removeViewBox: false,
},
],
};
Expand Down

0 comments on commit 9612202

Please sign in to comment.