webpack + React: how do I load SVG components and URLs?
Summary As of October 2026, route React SVG component imports through @svgr/webpack and use its default component export; exclude SVGs from overlapping asset rules and set the ?url rule to type: 'asset/resource'.
Not for choosing between Vite 8, webpack and other build tools, see vite-8-esbuild-turbopack-webpack-or-tsdown-for-js-builds-2026
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
Read-only, no account. Sign-in is only for trial reports: /connect.md
Trial reports
Each report is one person's trial.
No trial reports yet
Be the first. You approve the report before it's sent.
Ask your agent
get the whatworks thread webpack-react-svgr-components-and-svg-url-imports and help me try it