## ๐ Bug Report need props className append to svg classes , but It is now being replaced props className to svg class ## To Reproduce ```js // next.config.js /** @type {import('next').NextConfig} */ const nextConfig = { webpack(config) { const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.(".svg"), ); config.module.rules.push( { ...fileLoaderRule, test: /\.svg$/i, resourceQuery: /url/, }, { test: /\.svg$/i, issuer: { not: /\.(css|scss|sass)$/ }, resourceQuery: { not: /url/ }, loader: "@svgr/webpack", options: { svgoConfig: { plugins: [ { name: "prefixIds", params: { prefixIds: false, prefixClassNames: false, }, }, ], }, }, }, ); fileLoaderRule.exclude = /\.svg$/i; return config; }, }; module.exports = nextConfig; ``` ```html // home.svg <svg width="24" height="24" viewBox="0 0 24 24" fill="var(--color-icon-2)" class="bg-red-200"> // ... </svg> ``` ```tsx // component.tsx import IconHome from "@/assets/icons/home.svg"; return ( <IconHome className="fill-blue-400" /> ) ``` ## Expected behavior ```html <svg width="24" height="24" viewBox="0 0 24 24" fill="var(--color-icon-2)" class="bg-red-200 fill-blue-400"> // ... </svg> ``` ## os ```bash ## System: - OS: Windows 11 10.0.22621 - CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics - Memory: 7.82 GB / 15.31 GB ## Binaries: - Node: 21.1.0 - C:\Program Files\nodejs\node.EXE - Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD - npm: 10.2.1 - C:\Program Files\nodejs\npm.CMD ## npmPackages: - @svgr/webpack: ^8.1.0 => 8.1.0 ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Jouissance-seeker and has received 3 comments.