vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.61k stars 26.93k forks source link

tsconfig `references` not supported by Turbopack #68614

Open sibbng opened 2 months ago

sibbng commented 2 months ago

Link to the code that reproduces this issue

https://github.com/sibbng/next-paths-repro

To Reproduce

  1. Run dev script
  2. Visit site
  3. Check terminal

Current vs. Expected behavior

When using the references option in tsconfig.json these references are not resolved, meaning that any option passed in them does not work.

The implementation for webpack uses Typescript directly to load the config.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 8021
  Available CPU cores: 4
Binaries:
  Node: 22.4.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.106 // Latest available version is detected (15.0.0-canary.106).
  eslint-config-next: N/A
  react: 19.0.0-rc-06d0b89e-20240801
  react-dom: 19.0.0-rc-06d0b89e-20240801
  typescript: 5.3.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

timneutkens commented 2 months ago

I've updated the description after looking at the reproduction, reproduction is still valid but the root cause is different 👍 For now I'd recommend to just move the config into the tsconfig.json file which will fully unblock you.