Skip to content

Minified function names in turbopack prod builds for server-side code #87896

@chargome

Description

@chargome

Link to the code that reproduces this issue

https://github.com/chargome/repro.turbopack-prod-server-sourcemaps

To Reproduce

Reproduction steps are in the readme file of the repro.

Current vs. Expected behavior

When building a Next.js app using next build, the names field in the source map files for server-side code is always empty which results in mappings not being able to reference an index from minified filename to original filename. This is only the case for server-side sourcemaps, not for client-side.

If this information is omitted due to performance reasons I would expect the next config to provide some option to opt-out of this behaviour.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.14.0
  npm: 10.7.0
  Yarn: 1.22.22
  pnpm: 10.19.0
Relevant Packages:
  next: 16.1.1 // Latest available version is detected (16.1.1).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.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 build (local), Vercel (Deployed), Other (Deployed)

Additional context

No response

Metadata

Metadata

Assignees

Labels

TurbopackRelated to Turbopack with Next.js.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions