forked from 18F/identity-idp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svgo.config.js
30 lines (28 loc) · 838 Bytes
/
svgo.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/** @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;