<!-- Love SVGR? Please consider supporting our collective: ๐ https://opencollective.com/svgr/donate --> ## ๐ Bug Report [The documentation](https://react-svgr.com/docs/options/#title) says that > ...If titleProp is set to true and no title is provided (title={undefined}) at render time, this will fallback to an existing title element in the svg if exists. But, setting `titleProp: true` in Next.js webpack doesn't add title even if the SVG itself has a title element in it. > Note that I'm using typescript in my project ## To Reproduce 1. Create a Nextjs project and configure SVGR in it ```js config.module.rules.push({ test: /\.svg$/i, issuer: /\.[jt]sx?$/, // { not: /\.(css|scss|sass)$/ }, resourceQuery: /svgr/, // only use svgr to load svg if path ends with *.svg?svgr use: [{ loader: "@svgr/webpack", options:{ titleProp: true, // default is false descProp: true, // default is false } }], }); ``` 2. Create an SVG with `<title>` element in it 3. import the ReactSvgImport into any component in React `import SVG from './../abc.svg?svgr` 4. Use the imported SVG in React JSX `<ReactSvgImport />` ## Expected behavior The resultant SVG in DOM should fallback to the existing title element from the root SVG <!-- ## Link to repl or repo (highly encouraged) Please provide a minimal repository on GitHub. Issues without a reproduction link are likely to stall. ## Run `npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard` Paste the results here: ```bash ``` -->
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 AnweshGangula and has received 1 comments.