Skip to content

Commit

Permalink
chore: fix building errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jack0pan committed Dec 4, 2021
1 parent 8d8ea67 commit ab1c50c
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .svgrrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
module.exports = {
svgo: true,
svgoConfig: {
"plugins": [
plugins: [
{
"name": "preset-default",
"params": {
"overrides": {
"removeViewBox": false
name: 'preset-default',
params: {
overrides: {
removeViewBox: false
}
}
},
{
"name": "removeXMLNS",
"params": true
name: 'removeAttrs',
params: {
attrs: [
'fill',
'svg:width',
'svg:height'
]
}
},
{
name: 'removeXMLNS',
params: true
},
{
"name": "convertStyleToAttrs",
"params": true
name: 'convertStyleToAttrs',
params: true
}
]
},
Expand All @@ -35,13 +45,6 @@ module.exports = {
jsx: {
babelConfig: {
plugins: [
[
'@svgr/babel-plugin-remove-jsx-attribute',
{
elements: ['svg', 'g', 'rect'],
attributes: ['className', 'id', 'fill', 'data-name'],
},
],
[
'@svgr/babel-plugin-add-jsx-attribute',
{
Expand Down

0 comments on commit ab1c50c

Please sign in to comment.