Skip to content

Commit

Permalink
Make SVGR icons use forward ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain committed Aug 30, 2023
1 parent 19b2ede commit 2ea9570
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ module.exports = (env, argv) => {
removeDimensions: true,
},
},
/**
* Forwards the React ref to the root SVG element
* Useful when using things like `asChild` in
* radix-ui
*/
ref: true,
esModule: false,
name: "[name].[hash:7].[ext]",
outputPath: getAssetOutputPath,
Expand Down

0 comments on commit 2ea9570

Please sign in to comment.