vercel / vercel/next.js

Turbo loader item options type too strict

Open
#74,336 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TypeScript
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/Netail/repro-next-typescript-next-config

To Reproduce
  1. Install dependencies; yarn install
  2. Inspect next.config.ts
  3. Svgr options clash with turbo options type
Current vs. Expected behavior

The turbo loader options type are a bit too strict compared to what's allowed by e.g. the SVGR plugin options

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 22.11.0
  npm: 10.9.0
  Yarn: 1.22.22
  pnpm: 9.6.0
Relevant Packages:
  next: 15.1.3 // Latest available version is detected (15.1.3).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
  output: N/A
Which area(s) are affected? (Select all that apply)

TypeScript

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

next dev (local)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run yarn install in the linked reproduction and inspect next.config.ts to isolate the clash between SVGR options and the turbo loader options type. Trace the corresponding Next.js TypeScript definitions, then verify that the reproduction config type-checks while retaining the supported turbo options.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.