Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Turbopack renders incorrect SVGs when multiple are imported via @svgr/webpack #78675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lukevella opened this issue Apr 29, 2025 · 0 comments
Labels
linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Comments

@lukevella
Copy link

lukevella commented Apr 29, 2025

Link to the code that reproduces this issue

https://github.com/lukevella/turbopack-svgr-issue

To Reproduce

  1. Clone the minimal reproduction repository:
    git clone https://github.com/lukevella/turbopack-svgr-issue.git
    cd turbopack-svgr-issue
  2. Install dependencies:
    pnpm install
  3. Run the development server with Turbopack:
    pnpm dev:turbo
  4. Observe the browser output. You will see the same SVG icon repeated three times.
  5. (Optional) Stop the server, run pnpm dev, and observe that the three different SVGs are rendered correctly.

Current vs. Expected behavior

The SVG that was imported last is rendered in place of all other SVGs on the same page.

Without Turbopack (Correct) With Turbopack (Incorrect)
Screenshot showing three distinct SVGs when running without Turbopack Screenshot showing the same SVG repeated three times when running with Turbopack

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041
  Available memory (MB): 24576
  Available CPU cores: 12
Binaries:
  Node: 20.18.1
  npm: 10.8.2
  Yarn: N/A
  pnpm: 10.9.0
Relevant Packages:
  next: 15.3.1 // Latest available version is detected (15.3.1).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Apr 29, 2025
@mischnic mischnic added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants