## What this teaches

How to sVG via svgr support.

## The problem

Issue vercel/turborepo#4832 (closed, 35 comments): ### What version of Turborepo are you using? next@13.4.1 ### What package manager are you using / does the bug impact? npm ### What operating system are you using? Mac ### Describe the Bug In Next.js, I use the SVG image include using the svgr webpack plugin. ```typescript // SiteLogo.svg import LogoImage from 'public/images/logo.svg'; ``` Next.js config: ```js // next.config.js const nextConfig = { reactStrictMode: true, swcMinify: true, experimental: { appDir: true, }, webpack(config) { // Support SVG (aviable ) config.module.rules.push({ test: /\.

## What worked (verified answer)

If SVG imports break under Turbopack ('Module parse failed'), add an SVGR rule to your Next.js config: under turbopack.rules, map '*.svg' to loaders ['@svgr/webpack'] with as '*.js'. On Next 15.3 and later this lives at the top-level turbopack key; on older versions it was under experimental.turbo. Multiple users confirmed this fixes it.

## Source

gh:vercel/turborepo#4832 - https://github.com/vercel/turborepo/issues/4832
