svgr icon indicating copy to clipboard operation
svgr copied to clipboard

docs: add Turbopack configuration instructions to Next.js documentation

Open jiaming0708 opened this issue 7 months ago • 1 comments

Summary

This PR adds documentation about using SVGR with Next.js when using Turbopack as the bundler. While SVGR already works with Next.js using webpack, there are specific configuration requirements when using Turbopack that weren't previously documented. This addition will help developers who are migrating to Turbopack or starting new Next.js projects with Turbopack to properly integrate SVGR for SVG imports.

Test plan

I've verified these instructions in a Next.js project using Turbopack by:

  1. Setting up a basic Next.js project with Turbopack enabled
  2. Implementing the configuration as documented
  3. Successfully importing and rendering SVG files as React components

The documentation accurately reflects the steps needed to make SVGR work properly in this environment.

jiaming0708 avatar May 18 '25 07:05 jiaming0708

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svgr ❌ Failed (Inspect) May 18, 2025 7:36am

vercel[bot] avatar May 18 '25 07:05 vercel[bot]