From 1ada110fed0ef0858c6f58612d62f290fc8d69de Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 30 Aug 2023 18:09:29 +0100 Subject: [PATCH] Make SVGR icons use forward ref (#26082) --- webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 14cca1303d..5df93113e8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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,