-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvgo.config.js
More file actions
26 lines (25 loc) · 801 Bytes
/
svgo.config.js
File metadata and controls
26 lines (25 loc) · 801 Bytes
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
/**
* SVGO is a tool that optimizes SVG files. It is used by SVGR to optimize SVG files before they are
* transformed into React components.
*
* For configuration options, @see {@link https://github.com/svg/svgo/blob/main/README.md}
* @type {import('svgo').Config}
*/
const config = {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
// Removing viewBox attribute causes CSS scaling to break.
// See https://github.com/svg/svgo/blob/main/README.md#svg-wont-scale-when-css-is-applied-on-it
removeViewBox: false,
},
},
},
// This makes sure that IDs inside SVG files don't collide with one another so that styles
// applied to one don't leak into others.
'prefixIds',
],
};
export default config;