18F/identity-idp

View on GitHub
svgo.config.js

Summary

Maintainability
A
0 mins
Test Coverage
/** @type {import('svgo').Config} */
const config = {
  multipass: true,
  plugins: [
    {
      name: 'preset-default',
      params: {
        overrides: {
          // `minifyStyles` is disabled since some SVG use `@keyframes` for animations (for example,
          // `id-card.svg`), which is removed with the `minifyStyles` plugin.
          // Related: https://github.com/svg/svgo/issues/888
          minifyStyles: false,

          // `removeViewBox` is disabled since `viewbox` is a meaningful attribute, and notably this
          // can cause rendering issues in some browsers.
          // Related: https://github.com/svg/svgo/issues/1128
          removeViewBox: false,
        },
      },
    },
    {
      name: 'removeAttrs',
      params: {
        attrs: 'data-name',
      },
    },
  ],
};

module.exports = config;