Skip to content

Commit

Permalink
Merge pull request #27162 from element-hq/renovate/svgr-webpack-8.x
Browse files Browse the repository at this point in the history
Update dependency @svgr/webpack to v8
  • Loading branch information
t3chguy authored Mar 12, 2024
2 parents b68ff2f + 28038cc commit 54ba087
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 309 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@casualbot/jest-sonar-reporter": "2.2.7",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@sentry/webpack-plugin": "^2.7.1",
"@svgr/webpack": "^5.5.0",
"@svgr/webpack": "^8.0.0",
"@testing-library/react": "^12.1.5",
"@types/commonmark": "^0.27.9",
"@types/content-type": "^1.1.8",
Expand Down
16 changes: 13 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,20 @@ module.exports = (env, argv) => {
// props set on the svg will override defaults
expandProps: "end",
svgoConfig: {
plugins: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false,
},
},
},
// generates a viewbox if missing
removeDimensions: true,
},
{ name: "removeDimensions" },
// https://github.com/facebook/docusaurus/issues/8297
{ name: "prefixIds" },
],
},
/**
* Forwards the React ref to the root SVG element
Expand Down
Loading

0 comments on commit 54ba087

Please sign in to comment.