nextjs - 💡(How to fix) Fix createJestConfig transform missing mts extension

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

Operating System:
  Platform: linux
  Arch: x64
Binaries:
  Node: 22.22.3
  npm: 
  Yarn: 
  pnpm: N/A
Relevant Packages:
  next: 16.2.4 // There is a newer version (16.2.7) available, upgrade recommended! 
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: standalone
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/vercel/next.js/blob/canary/packages/next/src/build/jest/jest.ts#L192

To Reproduce

createJestConfig transform pattern is missing mts extension which seems to be supported by SWC https://github.com/swc-project/swc/pull/6959/changes

Is there a particular reason for this or just forgotten?

Current vs. Expected behavior

I believe mts can be compiled with SWC same way as ts files using ESM.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
Binaries:
  Node: 22.22.3
  npm: 
  Yarn: 
  pnpm: N/A
Relevant Packages:
  next: 16.2.4 // There is a newer version (16.2.7) available, upgrade recommended! 
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: standalone

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

Testing

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

next dev (local)

Additional context

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING